diff --git a/clang/include/clang/Basic/Diagnostic.td b/clang/include/clang/Basic/Diagnostic.td index 5f1e4ec4da84..67510ea83c4d 100644 --- a/clang/include/clang/Basic/Diagnostic.td +++ b/clang/include/clang/Basic/Diagnostic.td @@ -12,31 +12,38 @@ // //===----------------------------------------------------------------------===// -// All diagnostics emitted by the compiler are an indirect subclass of this. -class Diagnostic { - string Component = ?; - string Text = text; -} - -class Error : Diagnostic; -class Note : Diagnostic; - -// Anything that can be controlled by an option subclasses this. -class OptionControlled; - -class DiagnosticControlled - : Diagnostic, OptionControlled { - string DefaultMapping = defaultMapping; -} -class Warning : DiagnosticControlled {} -class Extension : DiagnosticControlled {} -class ExtWarn : DiagnosticControlled {} +// 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; } +// Definitions for options ("warning groups"). +include "DiagnosticOptions.td" + +*/ + +// 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 Error : Diagnostic; +class Warning : Diagnostic; +class Extension : Diagnostic; +class ExtWarn : Diagnostic; +class Note : Diagnostic; + // Definitions for Diagnostics. include "DiagnosticASTKinds.td" include "DiagnosticAnalysisKinds.td" @@ -47,5 +54,3 @@ include "DiagnosticLexKinds.td" include "DiagnosticParseKinds.td" include "DiagnosticSemaKinds.td" -// Definitions for options ("warning groups"). -include "DiagnosticOptions.td"