<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56650>56650</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] add alignment threshold
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Hedede
</td>
</tr>
</table>
<pre>
Should work like this: when aligning two consecutive declarations would produce more than X extra spaces, don't align.
Example:
```
auto a = 1;
auto foobar = 2;
auto very_long_variable_name = 3;
```
With
```
AlignConsecutiveDeclarations: true
```
It is formatted as
```
auto a = 1;
auto foobar = 2;
auto very_long_variable_name = 3;
```
But with
```
AlignConsecutiveDeclarations: true
AlignmentThreshold: 5
```
It should be formatted as
```
auto a = 1;
auto foobar = 2;
auto very_long_variable_name = 3;
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1U0tv2zAM_jXyRWhgy48sBx-SZsV23oDtFlASbWuVpUCSk_bfT7KztR2yAsNaW6DNh8iPH0hu5WP7ZbCTlvRs3T3V6h5pGJQn5ZaeBzQUtOqNMj0NZ0uFNR7FFNQJqUShwUFQ0RYvpxRHZ-UkkI7WpSxg6HeKD8EB9UcQ6Am7pdIawtZhybsi-Z7k20V-fIDxqDFWvlib_HJmFaZgKVBS7mlByt0zY2ctBzd72EvPCd3jQVvTH07gFHCNBwMjzqHl79A_Cn1TYbjq2CbIt08U7J8xkPgKbsKrFxf5OVDlI1g3QggoKfjX-rz-_L37q6FvQccid1Og5_8nZo4c0YSvg0M_WC2Tv36dNb8MKMd_I-89JyWTbSk35QayoILGltS72LLpbxaEpN5TkHIZ8tRu3IZLv9nkdDuEcEzMEHYXTx95nfhK2DEqWp9-fW7iPv1AEaKqvJ_S_tzVTVPn2dBWTdVJEBwr3myqphadqHjZFcUGSy4gzzRw1D4BI4wZPNM5RfyP2DLVspyxfM2KgrG6YKuqaboS5VpW3YcCMCdVjiMovUo4Vtb1mWtnSHzqfXRq5YN_coL3sVGceUj5I6WDde0nlPHN5srtjPwnEKhRfQ">