================ @@ -168,3 +168,17 @@ const char *extra_parens_to_suppress_warning[] = { "promise"), "shared_future" }; + +const char *multiple_missing_commas[] = { + "1", + "2" // expected-note {{place parentheses around the string literal to silence warning}} + "3", // expected-warning {{suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma?}} + "4", + "5", + "6" // expected-note {{place parentheses around the string literal to silence warning}} + "7", // expected-warning {{suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma?}} + "8", + "9", + "10", ---------------- Fznamznon wrote:
Can we add a mixed test like this ``` const char *multiple_missing_commas2[] = { "1", "2" // multiple consecutive missing commas, no warn "3" "4" "5", "6" // one missing, warn "7", "8", "9", "10", "11", }; ``` Is my guess that we don't to warn on multiple consecutive commas because they are not considered "suspicious"? https://github.com/llvm/llvm-project/pull/154018 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits