Only increment the number of diagnostics when the DiagnosticClient used

is the one attached to the Diagnostic object.

llvm-svn: 49677
This commit is contained in:
Ted Kremenek 2008-04-14 19:56:12 +00:00
parent 5b61a288a7
commit 193f185902
1 changed files with 6 additions and 2 deletions

View File

@ -221,7 +221,9 @@ void Diagnostic::Report(DiagnosticClient* C,
if (DiagLevel >= Diagnostic::Error) {
ErrorOccurred = true;
++NumErrors;
if (C == &Client)
++NumErrors;
}
// Finally, report it.
@ -230,7 +232,9 @@ void Diagnostic::Report(DiagnosticClient* C,
C->HandleDiagnostic(*this, DiagLevel, Pos, (diag::kind)DiagID,
Strs, NumStrs, Ranges, NumRanges);
++NumDiagnostics;
if (C == &Client)
++NumDiagnostics;
}
DiagnosticClient::~DiagnosticClient() {}