[cfe-commits] r63896 - /cfe/trunk/include/clang/Basic/Diagnostic.h

Chris Lattner sabre at nondot.org
Thu Feb 5 14:56:06 PST 2009


Author: lattner
Date: Thu Feb  5 16:56:06 2009
New Revision: 63896

URL: http://llvm.org/viewvc/llvm-project?rev=63896&view=rev
Log:
allow mapping errors to fatal.

Modified:
    cfe/trunk/include/clang/Basic/Diagnostic.h

Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=63896&r1=63895&r2=63896&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Thu Feb  5 16:56:06 2009
@@ -164,7 +164,8 @@
   void setDiagnosticMapping(diag::kind Diag, diag::Mapping Map) {
     assert(Diag < diag::DIAG_UPPER_LIMIT &&
            "Can only map builtin diagnostics");
-    assert(isBuiltinNoteWarningOrExtension(Diag) && "Cannot map errors!");
+    assert((isBuiltinNoteWarningOrExtension(Diag) || Map == diag::MAP_FATAL) &&
+           "Cannot map errors!");
     unsigned char &Slot = DiagMappings[Diag/2];
     unsigned Bits = (Diag & 1)*4;
     Slot &= ~(7 << Bits);





More information about the cfe-commits mailing list