<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123030>123030</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Add break after assignment to format multiline expressions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Ren911
</td>
</tr>
</table>
<pre>
In our project we want an option to break after first assignment with multiline statements
For example, if expression doesn’t fit on a single line, we add a break after assignment.
### Example 1
```
anytype result = veerrrryyyyloooonnnnggggvaaarrriiiaabbblleeenameeee + seccconnnddverrryyyloooonnnggvarriaabbleeenammeeee + orjustalotofvariablesinvolvedinoneassignment;
```
The expression above should become [like in this stackoverflow question](https://stackoverflow.com/questions/59235609/clang-format-multiline-variable-assignments)
```
anytype result =
veerrrryyyyloooonnnnggggvaaarrriiiaabbblleeenameeee +
seccconnnddverrryyyloooonnnggvarriaabbleeenammeeee +
orjustalotofvariablesinvolvedinoneassignment;
```
### Example 2
```
anytype result = some_long_function_with_arguments(arg1, arg2, arg3);
```
should become
```
anytype result =
some_long_function_with_arguments(arg1, arg2, arg3);
```
### What exists now in clang-format?
An option _AlwaysBreakBeforeMultilineStrings_ already exists in clang-format, and we want something similar, not only strings.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVU2vozYU_TXO5orI2CEJCxakbyLNopu2UpfRBS7gecZObUMe_75yQpL3ZtpqOq2EQiT7XM49536g96ozRAXLDix7WeEYeuuKX8jkabqqbDMXjJeMl58N2NHB2dkvVAe4EFzQBEAD9hyUNRAsVI7wFbAN5KBVzge4hR_IBLio0MMw6qC0MgQ-YKB44Bkvj9YBveFw1sTET6BaoLezI-9j4MaSN-yTYHvO8jxAqwJYAwhemU4TxHARdSHApgH8QONJYH3Lgwl5e-DT7YOQwnKy5cvDSzRzmM8EjvyoAzD5AhORc87N8zxra601xpiu67oJEZ1zSinEqqq0JiKDAxERMHEAT3Vdx9tNM9EtwB0fwc5dcQvqCbPuy-gDahtsO6FTWGnyykxWT9QoYw09U2Py8BV_xsvfenqvIlZ2IvC9HXUDFdV2IGDZQatXAmUg9MpHT-pXO5Frtb3AHyP56CzLXpjY9yGcPZMlE0cmjh9urms7MHG83_dMHLNcyGzLcyaOtUbTJa11A4bk4X9yzyl5puGZyL_LCsZLAPhRRxb0j_mygP-zO9-Wofiu1L0d6KSt6U7taOoo9yk21gldNy4a7tF1aWwIdJ1Y3jJK-w2PD9Xwb5T_X1l8UOP3HgPQm_LBg7GXWJrvC4jJ4w1RPubOqdQXnP0hNv2BWuvo53uR_RqcMp0_AaB2hM18j_x11EjPNI-hFtMLvTIdeDUojS5eMDaOHT2Dv0V9zJOUZYfPA3b0V43SqdCP1dIhoyeXYAhY94tKR_Sern-2lCFtsizZNPGnyuoEK7lPWllJLjCtBMpHf6yaQja5zHFFRbqT21zKzXa_6guB1W5XbRpebcU2I9rwthEZx_1-32KKm5UqBBcZT9OM5zLl-3W7aYljI3ai3Yk637INpwGVXms9DWvrupXyfqQiFZJLvtJYkfbXbSGEoQtcT5kQcXm4IoKSauw823AdpX6GCSpoKsqm-Zv5HBfIzY53W-I5wPxqdLr4B3Hjh5ZXsmwpJo5XelHfhf9UiD8DAAD__xRXUFA">