Skip to content

Commit

Permalink
tblgen/ClangDiagnostics: Add support for split default warning "no-we…
Browse files Browse the repository at this point in the history
…rror" and

"show-in-system-header" bits, which I will be adding in Clang shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140741 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Sep 29, 2011
1 parent 5cd4ee7 commit caf1912
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion utils/TableGen/ClangDiagnosticsEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit caf1912

Please sign in to comment.