Commit cd3022dc authored by Roberto Raggi's avatar Roberto Raggi

Show all the warn messages.

parent f55d5500
......@@ -55,7 +55,8 @@ class DocumentDiagnosticClient : public DiagnosticClient
public:
DocumentDiagnosticClient(Document *doc, QList<Document::DiagnosticMessage> *messages)
: doc(doc),
messages(messages)
messages(messages),
errorCount(0)
{ }
virtual void report(int level,
......@@ -63,8 +64,12 @@ public:
unsigned line, unsigned column,
const char *format, va_list ap)
{
if (messages->count() == MAX_MESSAGE_COUNT)
return;
if (level == Error) {
++errorCount;
if (errorCount >= MAX_MESSAGE_COUNT)
return; // ignore the error
}
const QString fileName = QString::fromUtf8(fileId->chars(), fileId->size());
......@@ -88,8 +93,10 @@ public:
}
}
private:
Document *doc;
QList<Document::DiagnosticMessage> *messages;
int errorCount;
};
} // anonymous namespace
......
......@@ -379,7 +379,7 @@ protected:
}
Overview oo;
translationUnit()->warning(ast->firstToken(), "`%s' is not a type-name",
translationUnit()->warning(ast->firstToken(), "`%s' is not a type name",
qPrintable(oo(ast->name->name)));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment