From: Nico Weber Date: Fri, 21 Apr 2017 20:55:00 +0000 (+0000) Subject: Add comments to the diagnostic kinds in Diagnostic.td. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=161f2d662400d104f1d07428ce3276b4db680af2;p=clang Add comments to the diagnostic kinds in Diagnostic.td. https://reviews.llvm.org/D32371 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301039 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Diagnostic.td b/include/clang/Basic/Diagnostic.td index 39da0060dd..f25068eca1 100644 --- a/include/clang/Basic/Diagnostic.td +++ b/include/clang/Basic/Diagnostic.td @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +// See the Internals Manual, section The Diagnostics Subsystem for an overview. + // Define the diagnostic severities. class Severity { string Name = N; @@ -100,10 +102,20 @@ class SuppressInSystemHeader { class Error : Diagnostic, SFINAEFailure { bit ShowInSystemHeader = 1; } +// Warnings default to on (but can be default-off'd with DefaultIgnore). +// This is used for warnings about questionable code; warnings about +// accepted language extensions should use Extension or ExtWarn below instead. class Warning : Diagnostic; +// Remarks can be turned on with -R flags and provide commentary, e.g. on +// optimizer decisions. class Remark : Diagnostic; +// Extensions are warnings about accepted language extensions. +// Extension warnings are default-off but enabled by -pedantic. class Extension : Diagnostic; +// ExtWarns are warnings about accepted language extensions. +// ExtWarn warnings are default-on. class ExtWarn : Diagnostic; +// Notes can provide supplementary information on errors, warnings, and remarks. class Note : Diagnostic;