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

Chris Lattner sabre at nondot.org
Sat May 2 12:34:22 PDT 2009


Author: lattner
Date: Sat May  2 14:34:21 2009
New Revision: 70639

URL: http://llvm.org/viewvc/llvm-project?rev=70639&view=rev
Log:
when creating custom warning diagnostics, do not attempt to map
them with -Werror.  Custom diags cannot be mapped, and this makes
-Werror cause a determinstic crash for the checker and other
clients of the custom diagnostics machinery.  rdar://6816191

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=70639&r1=70638&r2=70639&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Sat May  2 14:34:21 2009
@@ -162,11 +162,6 @@
         unsigned ID = DiagInfo.size()+DIAG_UPPER_LIMIT;
         DiagIDs.insert(std::make_pair(D, ID));
         DiagInfo.push_back(D);
-
-        // If this is a warning, and all warnings are supposed to map to errors,
-        // insert the mapping now.
-        if (L == Diagnostic::Warning && Diags.getWarningsAsErrors())
-          Diags.setDiagnosticMapping((diag::kind)ID, diag::MAP_ERROR);
         return ID;
       }
     };





More information about the cfe-commits mailing list