[cfe-commits] r67209 - /cfe/trunk/include/clang/Basic/Diagnostic.td
Ted Kremenek
kremenek at apple.com
Wed Mar 18 09:00:17 PDT 2009
Author: kremenek
Date: Wed Mar 18 11:00:17 2009
New Revision: 67209
URL: http://llvm.org/viewvc/llvm-project?rev=67209&view=rev
Log:
Refactor 'Warning', 'Extension', and 'ExtWarn' TableGen classes to subclass
'DiagnosticControlled'.
Modified:
cfe/trunk/include/clang/Basic/Diagnostic.td
Modified: cfe/trunk/include/clang/Basic/Diagnostic.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.td?rev=67209&r1=67208&r2=67209&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.td (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.td Wed Mar 18 11:00:17 2009
@@ -24,17 +24,13 @@
// Anything that can be controlled by an option subclasses this.
class OptionControlled;
-class Warning<string text> : Diagnostic<text>, OptionControlled {
- string DefaultMapping = "warning";
+class DiagnosticControlled<string text, string defaultMapping>
+ : Diagnostic<text>, OptionControlled {
+ string DefaultMapping = defaultMapping;
}
-class Extension<string text> : Diagnostic<text>, OptionControlled {
- string DefaultMapping = "ignore";
-}
-class ExtWarn<string text> : Diagnostic<text>, OptionControlled {
- string DefaultMapping = "warning";
-}
-
-
+class Warning<string text> : DiagnosticControlled<text, "warning"> {}
+class Extension<string text> : DiagnosticControlled<text, "ignore"> {}
+class ExtWarn<string text> : DiagnosticControlled<text, "warning"> {}
class Option<string name, list<OptionControlled> members> : OptionControlled {
string Name = name;
More information about the cfe-commits
mailing list