[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 15:34:48 PDT 2023


alexfh added a comment.

This patch makes clang-format produce invalid JS/TS code

In D154093#4644512 <https://reviews.llvm.org/D154093#4644512>, @eaeltsin wrote:

> This introduces an invalid TS transformation, from
>
>   type x = 'ab';
>
> to
>
>   type x = ('a'+'b');
>
> Which doesn't compile - https://www.typescriptlang.org/play?#code/C4TwDgpgBAHlC8UDkBDARkg3AKG6SUICUAFKklANTIYCUOQA
>
> Should we revert?

Similarly, strings in dictionary literals can't be broken: `var w = {'a' + 'b': 0};` (https://gcc.godbolt.org/z/6renEv5sa). Please fix or revert.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154093



More information about the cfe-commits mailing list