From: Ted Kremenek Date: Fri, 12 Aug 2011 20:46:52 +0000 (+0000) Subject: Place diagnostic warn_stringcompare under the "-Wstring-compare" flag. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42cd50c4e76380c34866d246099da6d13b71fe9b;p=clang 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 --- 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>; // 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