<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54257>54257</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format doesn't handle template variables and operators correctly
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
clang-format,
invalid-code-generation
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cjdb
</td>
</tr>
</table>
<pre>
Given
```cpp
template <class T>
inline constexpr bool signed_integral = std::is_integral_v<T> && std::is_signed_v<T>;
```
clang-format will stylise as
```cpp
template <class T>
inline constexpr bool signed_integral =
std::is_integral_v<T>&& std::is_signed_v<T>;
```
when it should be stylised as
```cpp
template <class T>
inline constexpr bool signed_integral =
std::is_integral_v<T> && std::is_signed_v<T>;
// ^
```
I'm unable to provide system details or clang-format details at present, but my estimate is that this clang-format build is at most a fortnight old.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNUk1v2zAM_TXyhUjgyHESH3xom27YffdCllhbhSwZEu0u_360vazLUAzogAEzaH2RIt97YhPMpf5sJ_QiP4v8Thzy1fQwrCeE_eAUIYjiQTuVEnwVxePqs95Zj6CDT4TfhghNCA6SbT2aJ-sJ26gcXzxDIiOKOzabfjqeJk45JwMhD2w3QT-SXENEcf8bwHXLiHy7eQ6xVwSv1nF1ujibEFT6p4zWcODvj9T-ntlrhx4sQerC6Aw0eGVm_hNqH3o1-YkN3v9E-fiuAuv4RchjD6NXjUOgAEMMkzWsxoVp9GCQlHUJQoSbXrie83KImNCTkA_QjAT9BTCR7WeZbALqOIQ6Xt3cb0bLqtslQR8SgQL2kLdtRxCc2WamLkxVVCojSw7r2-oBk2fgBJ3yZgZ-fZhJRTtT4cTeQBgwKgqRi4cYUZO7ZGN0dUc0pFnVRbfWUjc2Wx163jg3XacNa_HCl3hrUxox8aLcy_KYdfVJysqYk95VR1Voo8tKHstdqcvDXlW70ylzqkGXalHeCymbseVxVoinX5m8nVo_KWfNRgeDmxb9DNwGPweU58zWMpcyL_Kj3PFfbJXSu0YX1WGnn2VZabHPsecX2c7AtyG2WawXDlw6sZM7m9Kbk1t3biVc8HF-NVIXYq1fTJMtXOuF6Hdnc3rx">