summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-17 19:09:26 +0000
committerChris Lattner <sabre@nondot.org>2009-04-17 19:09:26 +0000
commitb63e1db6bc2bb60faef66d5f0898857761f23395 (patch)
treee89d8fc385f9f8110e2836c80de1c2c1b2bc1b39 /clang
parenta4c2290e5f80079f2c0c336d4f008686c7f74c8c (diff)
downloadbcm5719-llvm-b63e1db6bc2bb60faef66d5f0898857761f23395.tar.gz
bcm5719-llvm-b63e1db6bc2bb60faef66d5f0898857761f23395.zip
wire up comment diagnostics to -Wcomment, add it to -Wall. Now
you can silence these with -Wno-all or -Wno-comment, but they still default to on. llvm-svn: 69372
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticGroups.td4
-rw-r--r--clang/include/clang/Basic/DiagnosticLexKinds.td12
2 files changed, 10 insertions, 6 deletions
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 8e076843849..5f17a406ec4 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -17,6 +17,7 @@ def : DiagGroup<"cast-align">;
def : DiagGroup<"cast-qual">;
def : DiagGroup<"char-align">;
def : DiagGroup<"char-subscripts">;
+def Comment : DiagGroup<"comment">;
def : DiagGroup<"declaration-after-statement">;
def : DiagGroup<"error-implicit-function-declaration">;
def : DiagGroup<"format-security">;
@@ -31,8 +32,6 @@ def : DiagGroup<"missing-declarations">;
def : DiagGroup<"missing-format-attribute">;
def : DiagGroup<"nested-externs">;
def : DiagGroup<"newline-eof">;
-def : DiagGroup<"no-#warnings">;
-def : DiagGroup<"no-comment">;
def : DiagGroup<"format-y2k">;
def : DiagGroup<"long-long">;
def : DiagGroup<"missing-field-initializers">;
@@ -69,6 +68,7 @@ def : DiagGroup<"", [Extra]>; // -W = -Wextra
// Aggregation warning settings.
def Most : DiagGroup<"most", [
+ Comment,
ImplicitFunctionDeclare,
Switch,
Trigraphs,
diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td
index 32ce9e383eb..77406f5652d 100644
--- a/clang/include/clang/Basic/DiagnosticLexKinds.td
+++ b/clang/include/clang/Basic/DiagnosticLexKinds.td
@@ -16,9 +16,11 @@ let Component = "Lex" in {
def null_in_string : Warning<"null character(s) preserved in string literal">;
def null_in_char : Warning<"null character(s) preserved in character literal">;
def null_in_file : Warning<"null character ignored">;
-def warn_nested_block_comment : Warning<"'/*' within block comment">;
+def warn_nested_block_comment : Warning<"'/*' within block comment">,
+ InGroup<Comment>;
def escaped_newline_block_comment_end : Warning<
- "escaped newline between */ characters at block comment end">;
+ "escaped newline between */ characters at block comment end">,
+ InGroup<Comment>;
def backslash_newline_space : Warning<
"backslash and newline separated by space">;
@@ -31,9 +33,11 @@ def trigraph_ends_block_comment : Warning<"trigraph ends block comment">,
def trigraph_converted : Warning<"trigraph converted to '%0' character">,
InGroup<Trigraphs>;
-def ext_multi_line_bcpl_comment : Extension<"multi-line // comment">;
+def ext_multi_line_bcpl_comment : Extension<"multi-line // comment">,
+ InGroup<Comment>;
def ext_bcpl_comment : Extension<
- "// comments are not allowed in this language">;
+ "// comments are not allowed in this language">,
+ InGroup<Comment>;
def ext_no_newline_eof : Extension<"no newline at end of file">;
def ext_backslash_newline_eof : Extension<"backslash-newline at end of file">;
def ext_dollar_in_identifier : Extension<"'$' in identifier">;
OpenPOWER on IntegriCloud