<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54496>54496</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang format break syntax of C++ with ColumnLimit: 0 and trailing comment
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tophoo
</td>
</tr>
</table>
<pre>
Related to Bug #45791 and #51234 there is another Bug regarding the ColumnLimit: 0 in combination with a lambda statement and a trailing comment:
```
#define MACRO []()
foo(
1, MACRO { bar(); // comment
}, []() {}
);
```
becomes:
```
#define MACRO []()
foo(
1, MACRO { bar(); // comment }, []() {});
```
The clang-format file can be reduced to:
`ColumnLimit: 0`
for reproducing the error. The bug has been reproduced with clang-13.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFUstunTAQ_RqzGQWBDRdYsLgPZZWqUtQfsMGAW2Nf2SZp_r5j30ejtOm2yIDncc4ce0bY8a1_lpoHOUKwcNhmIJRVddOVwM0I0apL9EBYpJOgPLpt3KdcJ2fuRmXmGIaj1dtqntSqAmF7KEAZGOwqlOFBWQOvKizAQfNVjBx8wKqrNCEV4hAcVzpSISS6kYIUJ1Lsya64rotJ2SgnZSR82R-fvwKpD6Q-EdoS2l0z0neyNjrTHvApCT3eIM0BBHdXDDvgKR9x3SvfMaQ5RdT7EhEc3VctEf5XmUIim_T_7xT_Ev-57Mv3G3Zz0NzMD5N1Kw8wKY0ebkBIbPq4DWle3h_uY_PvjMiAkLOziLpNinTOuhxiGYFjtHCPxNLc85A9DctFQ8nybOzZ2LGOZ0EFLfsUgKs44ST_Af7NBP4T7ARHQg-4LhR_DGWcto-zlm1O90sI59SvdI0zgjeRYwIaWr_cfg-o8LscAprK-w07TB_rqup22dK3XVu1QlblrhkbPrAdawdWtu1Y0IYKPmWaC6l9H1tCqZGvkChwjx3KVE8LSguGb1fVrMingRaiqqhsGRU1K0lVyBWF51FHbt2cuT5Jwjv0GNTKB_87yL1Xs5Gyv0xAxrewWNcHe16szVLlPin_BYQiKwM">