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:
parent
5b61a288a7
commit
193f185902
|
@ -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() {}
|
||||
|
|
Loading…
Reference in New Issue