]> granicus.if.org Git - clang/commitdiff
Clear diagnostic counts after processing the diagnostics.
authorAxel Naumann <Axel.Naumann@cern.ch>
Tue, 10 Jul 2012 16:24:07 +0000 (16:24 +0000)
committerAxel Naumann <Axel.Naumann@cern.ch>
Tue, 10 Jul 2012 16:24:07 +0000 (16:24 +0000)
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

lib/Frontend/VerifyDiagnosticConsumer.cpp

index e55e75556108394b85a94bc8a9add63e0ca8aa8c..1d9c19644392b4dc3a76403093363d7d042670b8 100644 (file)
@@ -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 *