<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/127622>127622</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] Incorrect format with `ColumnLimit: 0` and `BreakConstructorInitializers: AfterColon`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hello48265
</td>
</tr>
</table>
<pre>
`.clang-format`:
```
ColumnLimit: 0
BreakConstructorInitializers: AfterColon
```
code:
```
struct Foo {
int x;
Foo():x(0) {}
};
```
result:
```
struct Foo {
int x;
Foo() :
x(0) {}
};
```
expected:
```
struct Foo {
int x;
Foo() : x(0) {}
};
```
This is clearly a bug, since setting `ColumnLimit` to a higher value like 120 or setting `BreakConstructorInitializers` to `BeforeColon` doesn't cause this problem.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykU9tunDAQ_ZrhZZSVGcDAAw9kV0iR-tgfMDCAG2OvbJMm_fqKJVKTVOpFQUiAOZe56KgQ9GyZGyjuobgkaouL883Cxri8IlkkvRtfGpDiNBhl57vJ-VVFkAKyFkS7vxy3aM_ObKv9olcdIWtxP7r3rB7PzobotyE6_2B11MroH-zDjmmnyP7sjLMftEC0gxv5d5NDCTvnEMp7EC2ithGfITs-OueAKqAasvYZqBJA9Q1ZXnal8nIAP3h5DpuJn3DDg4u36999-fnKQ-Txk87_4fh10QF1wMGw8uYFFfbbDHTGoO3AGDhGbWcEKd6uUwqMDhUuel7Y45MyG6PRj4wpCXT-Le-POz-EdhRPzvOxeilwdBwsUBlxUFtgjHuZV-96w-spGZtsrLNaJdykZVZXlRBZnixNP6k6H9OpHzktZZ1PtaBSySwt6rIXMk90Q4IKQWmV0s45lTJVXE1TkQ5FnRNDLnhV2pyMeVpPzs-JDmHjJqVSEiVG9WzCLRxE7wJAtMfFNzvvrt_mALkwOsTwSynqaG7BekcsLvhgB-c9DxGPM_yu4_Jx5LcESYHKjn-d6vskSZFs3jRLjNf9F1AH1M06Llt_GtwK1O0lvj7urt594yECdbfOA1D32vxTQz8DAAD__5IkNkk">