[cfe-commits] r49677 - /cfe/trunk/lib/Basic/Diagnostic.cpp
Ted Kremenek
kremenek at apple.com
Mon Apr 14 12:56:40 PDT 2008
Author: kremenek
Date: Mon Apr 14 14:56:12 2008
New Revision: 49677
URL: http://llvm.org/viewvc/llvm-project?rev=49677&view=rev
Log:
Only increment the number of diagnostics when the DiagnosticClient used
is the one attached to the Diagnostic object.
Modified:
cfe/trunk/lib/Basic/Diagnostic.cpp
Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=49677&r1=49676&r2=49677&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Mon Apr 14 14:56:12 2008
@@ -221,7 +221,9 @@
if (DiagLevel >= Diagnostic::Error) {
ErrorOccurred = true;
- ++NumErrors;
+
+ if (C == &Client)
+ ++NumErrors;
}
// Finally, report it.
@@ -230,7 +232,9 @@
C->HandleDiagnostic(*this, DiagLevel, Pos, (diag::kind)DiagID,
Strs, NumStrs, Ranges, NumRanges);
- ++NumDiagnostics;
+
+ if (C == &Client)
+ ++NumDiagnostics;
}
DiagnosticClient::~DiagnosticClient() {}
More information about the cfe-commits
mailing list