[cfe-commits] r49686 - /cfe/trunk/lib/Basic/Diagnostic.cpp

Ted Kremenek kremenek at apple.com
Mon Apr 14 14:21:39 PDT 2008


Author: kremenek
Date: Mon Apr 14 16:21:38 2008
New Revision: 49686

URL: http://llvm.org/viewvc/llvm-project?rev=49686&view=rev
Log:
Fix regression in Diagnostic that caused it to not register the number
of errors.

Modified:
    cfe/trunk/lib/Basic/Diagnostic.cpp

Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=49686&r1=49685&r2=49686&view=diff

==============================================================================
--- 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)
     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 @@
 
   // 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 mailing list