[clang] [clang-format] Do not break on JS fields like on goto labels (PR #76233)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 23 00:07:34 PST 2023


owenca wrote:

> This regressions was introduced in [70d7ea0](https://github.com/llvm/llvm-project/commit/70d7ea0cebcf363cd0ddcfb76375fb5fada87dd5). The commit moved some code and correctly picked up an explicit check for not running on Verilog. However, the moved code also never ran for JavaScript and after the commit we run it there and this causes the wrong formatting of:
> 
> ```js
> export type Params = Config&{
>   columns: Column[];
> };
> ```
> 
> into
> 
> ```js
> export type Params = Config&{
> columns:
>   Column[];
> };
> ```

Thanks for fixing this! I somehow missed this [part](https://github.com/llvm/llvm-project/commit/70d7ea0cebcf363cd0ddcfb76375fb5fada87dd5#diff-693c925375cc130d98d8edc63c7dcc509e0659c460452d361f466f367e508e1aL1931-L1934). :(

https://github.com/llvm/llvm-project/pull/76233


More information about the cfe-commits mailing list