[PATCH] D85545: [Diagnostics] Diagnose missing comma in string array initialization

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 7 13:07:07 PDT 2020


xbolva00 added a comment.

Do not warn for macros (found false positives when compiling linux kernel)

In D85545#2203660 <https://reviews.llvm.org/D85545#2203660>, @NoQ wrote:

> What if the user did actually want to concatenate the strings? Eg., one of the strings in the list is long and clang-format suggests breaking it up for the 80-column limit which causes the new warning to appear. How would the user suppress the warning in this case?

Parentheses could work here:

const char *test1[] = {

  "basic_filebuf",
  "basic_ios",
  "future",
  "optional",
  ("packaged_task"
  "promise"),
  "shared_future"

};


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85545/new/

https://reviews.llvm.org/D85545



More information about the cfe-commits mailing list