From e445e5d6377827f222f0d15e18fbd1f86114d2cc Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Tue, 10 Jul 2012 16:24:07 +0000 Subject: [PATCH] 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 --- lib/Frontend/VerifyDiagnosticConsumer.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 * -- 2.50.1