<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/87907>87907</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] Incorrect formatting when function is named instanceof
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kociap
</td>
</tr>
</table>
<pre>
My .clang-format contains
```
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: false
SpaceAfterTemplateKeyword: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
```
which should result in parentheses after function identifier being stuck to the identifier.
In the following snippet
```cpp
struct Value;
template<typename T>
[[nodiscard]] bool instanceof (Value const* value);
void replace_uses_with(Value* value, Value* replacement);
```
clang-format insists on erroneously inserting a space after the identifier `instanceof`, but does not do so in the case of `replace_uses_with`. This seems to happen only with `instanceof`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVF1v6jgQ_TXmZVQUHAjwkAc-LhLaT22rfb1ynAnx1vFkPZMi9tevnLJbaG9VCQEZnzknc2bGhtmdAmKpFlu12E_MIC3F8pmsM_2kovpS_nKBqfUmnB4aip0RsBTEuMCgsr3KNqrIrp_x8bE3FjeNYNw9ysXjzrCofAON8Yw3kC02FHEz6ncY5LceoxGKnMASh4_YnVA8BifOePcPxh15Cp8zH0OL0YkJFr9A_m4ihlH2V3zB-OH8DxNOuDWM9YHiz0T9p3xj2U_Y9d4I_oSXM8X6R7hj-Nb1chmFpUVG_hGKX-WfonHehdOOuuTTCJ3dwo5hE07-E45jeGvDV3rH8DXi8e_BRNxGY59R3oPejcK5dbYFbmnwNUTkwQu4AP2bCJjkGDRDsOIogKsxiGscRqjQhROwDPYZhEBavDmdXvXG72MYTxvyns5jUnB9j_LunWzfv0ZY4mAF_jR-QJVvb6nk2juV7-TSYzAdwpPKv10xaUe2gWrH1sRaLfZqsYeKyIMLPI4aNaD0aqROe8Ki9AZeRiW9fif2Qi7Z0ntj8fvAyN_PTtr_0m8Sd_B_5ApPg3BHeG_83bq6wI6FgQJgjBSQBvaXFMYoyS4DnJp77cW90aCK7K22JKB3UA0CNSFDoPQHmFJbU6I1jJA8KLKPhRXZFJ5ax8CIHaemtqbvMQAFf4EE-aA2ndRlXq_ztZlgOVvO9HyZr7PVpC2tzfVq1SzXtil0VjXVrGhqvZqZPNNNpYuJK3Wm59k8W2bL2Wy-mlosZrox60XRNIXJjZpn2Bnnp96_dFOKp4ljHrBcLdfZcuJNhZ7Ha1HrWz-V1umijGVKe6iGE6t55pPDb0TixI9X6l3iYg_HYClGtAKvsdH_c4vhZgUY0tjVNyM1GaIvW5E-7ZvSB6UPJyftUE0tdUofku7156GP9BdaUfowVsNKH8aC_g0AAP__Kj_20A">