<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63272>63272</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format: BreakBeforeInlineASMColon inconsistent with AlignAfterOpenBracket
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
gedare
</td>
</tr>
</table>
<pre>
With the `BreakBeforeInlineASMColon` Style option, lines that get broken by a ":" without tripping the line length limit do not follow the settings of `AlignAfterOpenBracket`, but will follow `AlignAfterOpenBracket` if the line length is hit before the ":".
Input that hits the colon before line length:
```
__asm__ volatile( "nop \n" : : );
```
Output with `clang-format -style="{BasedOnStyle: LLVM, BreakBeforeInlineASMColon: Always, AlignAfterOpenBracket: AlwaysBreak }"`
```
__asm__ volatile("nop \n"
:
:);
```
Input that hits the line length before the colon (one more space character):
```
__asm__ volatile( "nop \n" : : );
```
Output:
```
__asm__ volatile(
"nop \n"
:
:);
```
This inconsistency is problematic for me.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyclM-PqzgMx_-acLFahdBSeuBAp6r0pPc0h1ntHqsABrITEpSYqfrfr5K2O5Vmuto-xM_Ejv392EF6r3qDWLL1jq33iZxpsK7ssZUOk9q25_IvRQPQgMByvnMo33fYWYc_jFYGq7dfL1Zbw3IOb3TWCHYiZQ0TLxDmPdAgCXokqJ19RwP1GSQwIVhWMSHgpGiwMwE5NU3K9DFS8ASNpqcBtBoVQWvBWILOam1P0cYjkTK9B9uFzCqtelN1hO51QrNzsnlHYjkPidQzwUlpfXP_D3NQ3ZcMlIdBEdRR9oXELf0l43vGq8v9h5mCkKB3UOSjZRPg3FzvFg3uF9ecX8_4eTxKPx6P8GG1JKWRiSJEM3aC3zzY-sUE0CyrLpfYsmz3bfDXmaaIiobAqNHS9IvOulESLHyoLsv2Qftmt5Me21fzdhms4OfPP38F1I8bJKug0id59sHse_z_msRVANgmRss5_F9WV1RXzRezr0Ru7OPbYxyPq3rfHXdtcSk2E4U1CGMY9ZNsEJpBOtkQuhjs6cI_XcEnYnwieoTuOVp_DMqDMo01XnlC05zD9pmcrTWOklQDnXUw4jJpy6zdZluZYJnmRZ7z1SZNk6HsNijyvCmKotnyVZYJbHnKNxJXNd8Wa56oUnCR8TwVIk2LjC95u25WGU9bXmfdukG24jhKpZdaf4xL6_pEeT9jmWdiIxIta9Q-_u-EMHiCOBkkr_eJK4PPop57z1ZcK0_-cxVSpLG83xWhGg87_h7DdVN92_aQzE6XA9HkI-EDE4de0TDXy8aOTBxCAtfHYnL2b2yIiUNM2zNxiLL-CQAA__8v0rnL">