From: Chris Lattner Date: Wed, 15 Apr 2009 05:15:08 +0000 (+0000) Subject: make default diagnostic mapping more explicit in .td file. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=839324d564c7263402fb49e73c307817a0e5992c;p=clang make default diagnostic mapping more explicit in .td file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69149 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Diagnostic.td b/include/clang/Basic/Diagnostic.td index 5f1e4ec4da..67510ea83c 100644 --- a/include/clang/Basic/Diagnostic.td +++ b/include/clang/Basic/Diagnostic.td @@ -12,30 +12,37 @@ // //===----------------------------------------------------------------------===// -// All diagnostics emitted by the compiler are an indirect subclass of this. -class Diagnostic { - string Component = ?; - string Text = text; +// Define the diagnostic mappings. +class DiagMapping; +def MAP_IGNORE : DiagMapping; +def MAP_WARNING : DiagMapping; +def MAP_ERROR : DiagMapping; +def MAP_FATAL : DiagMapping; + +/* +class Option members> : OptionControlled { + string Name = name; + list Members = members; } -class Error : Diagnostic; -class Note : Diagnostic; +// Definitions for options ("warning groups"). +include "DiagnosticOptions.td" -// Anything that can be controlled by an option subclasses this. -class OptionControlled; +*/ -class DiagnosticControlled - : Diagnostic, OptionControlled { - string DefaultMapping = defaultMapping; +// All diagnostics emitted by the compiler are an indirect subclass of this. +class Diagnostic { + /// Component is specified by the file with a big let directive. + string Component = ?; + string Text = text; + DiagMapping DefaultMapping = defaultmapping; } -class Warning : DiagnosticControlled {} -class Extension : DiagnosticControlled {} -class ExtWarn : DiagnosticControlled {} -class Option members> : OptionControlled { - string Name = name; - list Members = members; -} +class Error : Diagnostic; +class Warning : Diagnostic; +class Extension : Diagnostic; +class ExtWarn : Diagnostic; +class Note : Diagnostic; // Definitions for Diagnostics. include "DiagnosticASTKinds.td" @@ -47,5 +54,3 @@ include "DiagnosticLexKinds.td" include "DiagnosticParseKinds.td" include "DiagnosticSemaKinds.td" -// Definitions for options ("warning groups"). -include "DiagnosticOptions.td"