<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123382>123382</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Forced line-break in pre-processor statements
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tl-photography
</td>
</tr>
</table>
<pre>
Lets assume we have this PP directive:
```c
#if ((CONDITION_A_SWITCH == ENABLED) || (CONDITION_A_SWITCH == ENABLED) || (CONDITION_A_SWITCH == ENABLED))
[...]
#endif
```
It would be nice to configure clang-format in a way that I would format this like:
```c
#if ( (CONDITION_A_SWITCH == ENABLED) \
|| (CONDITION_A_SWITCH == ENABLED) \
|| (CONDITION_A_SWITCH == ENABLED) )
[...]
#endif
```
The advantage of this would be that when SCM is used and lines would be added or removed, less or at least easier conflicts would occur.
In a large code base with a lot of feature switches, this would be very helpful.
I have checked the code if I could file a PR myself, but tbh I didn't find a place to start.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VMFu4zYQ_RrqMrAgU5YtH3Rw7DVqYJsNugF6XIzIkciGEg1yZMN_X9By2vTUpsAKBASRfE9v3uMQY7T9SNSI6klUhwwnNj407BZn49n3Ac_mlrVe35qvxBEwxmkguBIYvBCwsRFeXkDbQIrthUS5E8V9rIt5qPQhS9uBkLWQ9f7b8-H0evr2_GP34_vvp9f9LyDKgygP8OV59_T1y0HILYjNXmz28HO2p1HsRPWU57moDrM-GrXtPuqeyzgxXP3kNLQEo1UE7EH5sbP9FAiUw7FfdD4MyGBHQLjiDdggw-mBeyzejXL27d8MAvjvRVd7UewgPZ-16_8jP2HdqyFAfcGRsSfw3ezBX27eXboaGuH7_lewEaZIGnDU4OxIHzai1qTBBwg0-AtpIffgKMY0hQyOMDIQRkvhHo2zit_hXqkp5I8oUz4OQ0-gvCZoMRJcLZs07Tkp7Ag55RqvlpWhmH71T9UXCjcw5M7d5N5551ZQhtQbaWDz4LcdnEDNh8A6AoSX32C4RXJd4m0nBm4NnEBbPQq5YejsqAHh7HA-aJExcJ7pptTbcosZNctNuVmWm1VRZ6aRBdKqUh3K5brWxZZKpHVH1apbt62sVWYbWciqWC43y3pZFHXebbBS9XpdqlK3W1mLVUEDWpc7dxlyH_rMxjhRs5RlWcvMYUsu3q8GKUe6wn1VSJluitAk0KKd-ihWhbOR4980bNlRc_RB0Zznog2Eb6lHzoEW5-AVxehDKpFpoJFjNgXXGOZzTC0ij0Iee8tmanPlByGPifvxSvg_SLGQx7uiKOTxIfnSyD8DAAD__-X5dO8">