diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-14 21:21:38 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-14 21:21:38 +0000 |
commit | d0734e56d6794181e672d705ddb6e5e1f24af4ed (patch) | |
tree | 578408742f68f36951496c47887e5dab7de1e846 | |
parent | 080c40b192125434d884a2735b9f63104d274faa (diff) |
Fix regression in Diagnostic that caused it to not register the number
of errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49686 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index 77984d6a09..5835e75c1a 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -209,6 +209,9 @@ void Diagnostic::Report(DiagnosticClient* C, // If the client doesn't care about this message, don't issue it. if (DiagLevel == Diagnostic::Ignored) return; + + // Set the diagnostic client if it isn't set already. + if (!C) C = &Client; // If this is not an error and we are in a system header, ignore it. We have // to check on the original class here, because we also want to ignore @@ -228,8 +231,6 @@ void Diagnostic::Report(DiagnosticClient* C, // Finally, report it. - if (!C) C = &Client; - C->HandleDiagnostic(*this, DiagLevel, Pos, (diag::kind)DiagID, Strs, NumStrs, Ranges, NumRanges); |