xbolva00 added inline comments.

================
Comment at: clang/lib/Sema/SemaExpr.cpp:6916
+        for (unsigned i = 0; i < numConcat; ++i)
+          if (SL->getStrTokenLoc(i).isMacroID()) {
+            hasMacro = true;
----------------
Quuxplusone wrote:
> I wonder if perhaps the warning should trigger only if the concatenated 
> pieces appear one-per-line, i.e., whitespace-sensitive.
> 
>     const char a[] = {
>         "a"
>         "b"
>     };
>     const char b[] = {
>         "b" "c"
>     };
> 
> It's at least arguable that `a` is a bug and `b` is intentional, based purely 
> on how the whitespace appears. OTOH, whitespace is not preserved by 
> clang-format, and it would suck for clang-formatting the code to cause the 
> appearance (or disappearance) of diagnostics.
Hard to tell, no strong opinion.

We can always decrease the "power" of warning based on external feedback.


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

Reply via email to