Browse Source

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

Axel Naumann 13 years ago
parent
commit
e445e5d637
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/Frontend/VerifyDiagnosticConsumer.cpp

+ 3 - 0
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 *