summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp b/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp
index 0a48e75681f..130f3e1e763 100644
--- a/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ b/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -149,7 +149,7 @@ void ClangDiagsDefsEmitter::run(raw_ostream &OS) {
// 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 @@ void ClangDiagsDefsEmitter::run(raw_ostream &OS) {
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));
OpenPOWER on IntegriCloud