aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-08-12 20:46:52 +0000
committerTed Kremenek <kremenek@apple.com>2011-08-12 20:46:52 +0000
commit42cd50c4e76380c34866d246099da6d13b71fe9b (patch)
tree339e0e089fceda2a6ac1e1d29349fa644d848251
parent9d9eef9c56aa14117a7f2c83beb2d674eef3d1fa (diff)
Place diagnostic warn_stringcompare under the "-Wstring-compare" flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137507 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--test/Misc/warning-flags.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index eed21b1194..898ddfba0c 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -4265,7 +4265,8 @@ def warn_comparison_always : Warning<
def warn_stringcompare : Warning<
"result of comparison against %select{a string literal|@encode}0 is "
- "unspecified (use strncmp instead)">;
+ "unspecified (use strncmp instead)">,
+ InGroup<DiagGroup<"string-compare">>;
// Generic selections.
def err_assoc_type_incomplete : Error<
diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c
index 5191892c00..5aa035528b 100644
--- a/test/Misc/warning-flags.c
+++ b/test/Misc/warning-flags.c
@@ -17,7 +17,7 @@ This test serves two purposes:
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (314):
+CHECK: Warnings without flags (313):
CHECK-NEXT: auto_storage_class
CHECK-NEXT: backslash_newline_space
CHECK-NEXT: charize_microsoft_ext
@@ -305,7 +305,6 @@ CHECK-NEXT: warn_shift_negative
CHECK-NEXT: warn_standalone_specifier
CHECK-NEXT: warn_static_inline_explicit_inst_ignored
CHECK-NEXT: warn_static_non_static
-CHECK-NEXT: warn_stringcompare
CHECK-NEXT: warn_template_export_unsupported
CHECK-NEXT: warn_template_spec_extra_headers
CHECK-NEXT: warn_tentative_incomplete_array