[cfe-commits] r101516 - /cfe/trunk/include/clang/Basic/Diagnostic.h
Chris Lattner
sabre at nondot.org
Fri Apr 16 11:39:52 PDT 2010
Author: lattner
Date: Fri Apr 16 13:39:52 2010
New Revision: 101516
URL: http://llvm.org/viewvc/llvm-project?rev=101516&view=rev
Log:
allow mapping fatal errors to errors.
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=101516&r1=101515&r2=101516&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Fri Apr 16 13:39:52 2010
@@ -330,8 +330,9 @@
void setDiagnosticMapping(diag::kind Diag, diag::Mapping Map) {
assert(Diag < diag::DIAG_UPPER_LIMIT &&
"Can only map builtin diagnostics");
- assert((isBuiltinWarningOrExtension(Diag) || Map == diag::MAP_FATAL) &&
- "Cannot map errors!");
+ assert((isBuiltinWarningOrExtension(Diag) ||
+ (Map == diag::MAP_FATAL || Map == diag::MAP_ERROR)) &&
+ "Cannot map errors into warnings!");
setDiagnosticMappingInternal(Diag, Map, true);
}
More information about the cfe-commits
mailing list