From: Axel Naumann Date: Tue, 10 Jul 2012 16:24:07 +0000 (+0000) Subject: Clear diagnostic counts after processing the diagnostics. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e445e5d6377827f222f0d15e18fbd1f86114d2cc;p=clang Clear diagnostic counts after processing the diagnostics. The consumer might see multiple input files (e.g. for cling) and since r159977 the count is maintained across input files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159995 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/VerifyDiagnosticConsumer.cpp b/lib/Frontend/VerifyDiagnosticConsumer.cpp index e55e755561..1d9c196443 100644 --- a/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -527,6 +527,9 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Reset the buffer, we have processed all the diagnostics in it. Buffer.reset(new TextDiagnosticBuffer()); + ED.Errors.clear(); + ED.Warnings.clear(); + ED.Notes.clear(); } DiagnosticConsumer *