<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60948>60948</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format-16] IntegerLiteralSeparator for binary literals broken
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
h-2
</td>
</tr>
</table>
<pre>
With the following options:
```
IntegerLiteralSeparator:
Binary: 4
Decimal: 0
Hex: 0
```
clang_format complains:
```
error: code should be clang-formatted [-Wclang-format-violations]
constexpr uint8_t to_op_rank() const noexcept { return rank & 0b1111; }
^
```
This is a false positive, because `0b'1111` is not a valid bianry literal. Interestingly, `clang-format -i` also does not "fix" this.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k0-PmzAQxT_NcBkRGfP_wGHTNGql3lppj5GNJ-CuYyPbZJNvXwGbdltpKyGQh8fPbzwPEYIeLFEH5R7KQyLmODrfjSlPpFP37lnHEeNIeHbGuFdtB3RT1M4GyJ-AHYA9QcXernX51UYayH_Tkbww32kSXkTnf8sR99oKf4f8CYtH6UC9vgiz1Nij9oVu79b_7LLdeyPscDo7fxERe3eZjNAfOyPvVx_YO0UYRjcbhZJwpaQbJZJCKPfp8_tietXOiK3r8vDwh9g7GyLdJo-ztrE5RYzu5KaTF_YFeAO83SRoHd16miJCvUdPcfYWFxECr5DJLMsyyPcI9QMO5ef_tP1j1AF1QIFnYQLh5IKO-krAP6GkXsyBECrGJPB6ZVdskVsXUeBVGK1QamH9Hc02pR0uU_MUoraDuS8cqNj7I8BULxRhgkPlaIMB52d9A84xjjrsNnOJ6nLV5q1IqMuqus4qxso8GTtZU1GLtup7yivelrKvRMkb1jSMVW3fJrrjjOeM8zzLizrPd0pKpcpG1VIVedlKKBhdhDY7Y66XnfNDokOYqatYWzSJEZJMWIPMuaVXXF8C50uufbd8k8p5CFAwo0MMfyhRR7P-AX8NPaugPOAHccaz8yjXID8OMaD07oVsMnvTjTFOaxD5Efhx0HGc5a53F-DHZdu3Rzp595P6CPy4mg3Aj2szvwIAAP__-4QbaA">