[cfe-commits] r49686 - /cfe/trunk/lib/Basic/Diagnostic.cpp
kremenek at apple.com
Mon Apr 14 14:21:39 PDT 2008
Date: Mon Apr 14 16:21:38 2008
New Revision: 49686
Fix regression in Diagnostic that caused it to not register the number
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Mon Apr 14 16:21:38 2008
@@ -209,6 +209,9 @@
// If the client doesn't care about this message, don't issue it.
if (DiagLevel == Diagnostic::Ignored)
+ // 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 @@
// Finally, report it.
- if (!C) C = &Client;
C->HandleDiagnostic(*this, DiagLevel, Pos, (diag::kind)DiagID,
Strs, NumStrs, Ranges, NumRanges);
More information about the cfe-commits