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

Chandler Carruth chandlerc at gmail.com
Tue Aug 17 23:46:41 PDT 2010


Author: chandlerc
Date: Wed Aug 18 01:46:41 2010
New Revision: 111355

URL: http://llvm.org/viewvc/llvm-project?rev=111355&view=rev
Log:
Check whether errors should be included in the diagnostic counts. Previously,
only warnings did this check.

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=111355&r1=111354&r2=111355&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Wed Aug 18 01:46:41 2010
@@ -576,11 +576,11 @@
   // If a fatal error has already been emitted, silence all subsequent
   // diagnostics.
   if (FatalErrorOccurred) {
-    if (DiagLevel >= Diagnostic::Error) {
+    if (DiagLevel >= Diagnostic::Error && Client->IncludeInDiagnosticCounts()) {
       ++NumErrors;
       ++NumErrorsSuppressed;
     }
-    
+
     return false;
   }
 
@@ -601,9 +601,11 @@
   }
 
   if (DiagLevel >= Diagnostic::Error) {
-    ErrorOccurred = true;
-    ++NumErrors;
-    
+    if (Client->IncludeInDiagnosticCounts()) {
+      ErrorOccurred = true;
+      ++NumErrors;
+    }
+
     // If we've emitted a lot of errors, emit a fatal error after it to stop a
     // flood of bogus errors.
     if (ErrorLimit && NumErrors >= ErrorLimit &&





More information about the cfe-commits mailing list