[llvm-commits] [llvm] r140741 - /llvm/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
Daniel Dunbar
daniel at zuster.org
Wed Sep 28 17:29:05 PDT 2011
Author: ddunbar
Date: Wed Sep 28 19:29:04 2011
New Revision: 140741
URL: http://llvm.org/viewvc/llvm-project?rev=140741&view=rev
Log:
tblgen/ClangDiagnostics: Add support for split default warning "no-werror" and
"show-in-system-header" bits, which I will be adding in Clang shortly.
Modified:
llvm/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
Modified: llvm/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=140741&r1=140740&r2=140741&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Wed Sep 28 19:29:04 2011
@@ -149,7 +149,7 @@
// Filter by component.
if (!Component.empty() && Component != R.getValueAsString("Component"))
continue;
-
+
OS << "DIAG(" << R.getName() << ", ";
OS << R.getValueAsDef("Class")->getName();
OS << ", diag::" << R.getValueAsDef("DefaultMapping")->getName();
@@ -178,6 +178,22 @@
else
OS << ", false";
+ // FIXME: This condition is just to avoid temporary revlock, it can be
+ // removed.
+ if (R.getValue("WarningNoWerror")) {
+ // Default warning has no Werror bit.
+ if (R.getValueAsBit("WarningNoWerror"))
+ OS << ", true";
+ else
+ OS << ", false";
+
+ // Default warning show in system header bit.
+ if (R.getValueAsBit("WarningShowInSystemHeader"))
+ OS << ", true";
+ else
+ OS << ", false";
+ }
+
// Category number.
OS << ", " << CategoryIDs.getID(getDiagnosticCategory(&R, DGParentMap));
More information about the llvm-commits
mailing list