[PATCH] D32371: Add comments to the diagnostic kinds in Diagnostic.td.
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 21 14:00:34 PDT 2017
thakis created this revision.
https://reviews.llvm.org/D32371
Files:
include/clang/Basic/Diagnostic.td
Index: include/clang/Basic/Diagnostic.td
===================================================================
--- include/clang/Basic/Diagnostic.td
+++ 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 N> {
string Name = N;
@@ -100,10 +102,20 @@
class Error<string str> : Diagnostic<str, CLASS_ERROR, SEV_Error>, 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<string str> : Diagnostic<str, CLASS_WARNING, SEV_Warning>;
+// Remarks can be turned on with -R flags and provide commentary, e.g. on
+// optimizer decisions.
class Remark<string str> : Diagnostic<str, CLASS_REMARK, SEV_Ignored>;
+// Extensions are warnings about accepted language extensions that are
+// default-off but enabled by -pedantic.
class Extension<string str> : Diagnostic<str, CLASS_EXTENSION, SEV_Ignored>;
+// ExtWarns are warnings about accepted language extensions that are
+// default-on.
class ExtWarn<string str> : Diagnostic<str, CLASS_EXTENSION, SEV_Warning>;
+// Notes can provide supplementary information on errors, warnings, and remarks.
class Note<string str> : Diagnostic<str, CLASS_NOTE, SEV_Fatal/*ignored*/>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32371.96224.patch
Type: text/x-patch
Size: 1603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170421/f39509f7/attachment.bin>
More information about the cfe-commits
mailing list