]> granicus.if.org Git - clang/commitdiff
Place diagnostic warn_stringcompare under the "-Wstring-compare" flag.
authorTed Kremenek <kremenek@apple.com>
Fri, 12 Aug 2011 20:46:52 +0000 (20:46 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 12 Aug 2011 20:46:52 +0000 (20:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137507 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/Misc/warning-flags.c

index eed21b1194eb9fbeba0cf7c4e7067dfc482e089d..898ddfba0c2ce742f409a2b66d00d616e5d8fae0 100644 (file)
@@ -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<
index 5191892c00848527b802632179e4d7611d1c3db0..5aa035528b01ddc40b2be2a3059ae277285842c9 100644 (file)
@@ -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