================ @@ -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", ---------------- a-tarasyuk wrote:
@Fznamznon Thanks for the feedback! I’ve added a test to cover multiple consecutive missing commas. > Is my guess that we don't to warn on multiple consecutive commas because they > are not considered "suspicious"? I believe yes - consecutive concatenations are considered intentional multi-piece strings rather than suspicious typos, so they shouldn’t trigger a warning. Please correct me if I’m wrong. 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