diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-14 19:56:12 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-14 19:56:12 +0000 |
commit | 193f185902f185d9d9bfe224b7a046b18c7bb8fd (patch) | |
tree | eab4043a05c7a84297205c6997fc23f2d8317b57 /clang/lib/Basic/Diagnostic.cpp | |
parent | 5b61a288a76b29ff9ac6899c3cab589fb0ba04a5 (diff) | |
download | bcm5719-llvm-193f185902f185d9d9bfe224b7a046b18c7bb8fd.tar.gz bcm5719-llvm-193f185902f185d9d9bfe224b7a046b18c7bb8fd.zip |
Only increment the number of diagnostics when the DiagnosticClient used
is the one attached to the Diagnostic object.
llvm-svn: 49677
Diffstat (limited to 'clang/lib/Basic/Diagnostic.cpp')
-rw-r--r-- | clang/lib/Basic/Diagnostic.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp index 867b3dbec1a..77984d6a099 100644 --- a/clang/lib/Basic/Diagnostic.cpp +++ b/clang/lib/Basic/Diagnostic.cpp @@ -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() {} |