riccibruno added a comment. Is there a way to suppress this diagnostic if someone wants to legitimately initialize an element of the array with a long string by relying on string literal concatenation?
================ Comment at: clang/lib/Sema/SemaExpr.cpp:6910 << InitArgList[I]->getSourceRange(); + } else if (StringLiteral *SL = dyn_cast<StringLiteral>(InitArgList[I])) { + unsigned numConcat = SL->getNumConcatenated(); ---------------- `const auto *` ================ Comment at: clang/lib/Sema/SemaExpr.cpp:6921 + if (!hasMacro) + Diag(SL->getBeginLoc(), diag::warn_concatenated_literal_array_init); + } ---------------- Should this point to the location of the suspected missing comma? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85545/new/ https://reviews.llvm.org/D85545 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits