From dd62beb8f7004c14c6f7731cb57e2c188051208e Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 18 Mar 2009 16:00:17 +0000 Subject: [PATCH] Refactor 'Warning', 'Extension', and 'ExtWarn' TableGen classes to subclass 'DiagnosticControlled'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67209 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/Diagnostic.td | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/include/clang/Basic/Diagnostic.td b/include/clang/Basic/Diagnostic.td index 415e7fa811..dd8a872183 100644 --- a/include/clang/Basic/Diagnostic.td +++ b/include/clang/Basic/Diagnostic.td @@ -24,17 +24,13 @@ class Note : Diagnostic; // Anything that can be controlled by an option subclasses this. class OptionControlled; -class Warning : Diagnostic, OptionControlled { - string DefaultMapping = "warning"; +class DiagnosticControlled + : Diagnostic, OptionControlled { + string DefaultMapping = defaultMapping; } -class Extension : Diagnostic, OptionControlled { - string DefaultMapping = "ignore"; -} -class ExtWarn : Diagnostic, OptionControlled { - string DefaultMapping = "warning"; -} - - +class Warning : DiagnosticControlled {} +class Extension : DiagnosticControlled {} +class ExtWarn : DiagnosticControlled {} class Option members> : OptionControlled { string Name = name; -- 2.40.0