<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/118618>118618</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] v14 Misinterpretation of binary operators
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
NahuFigueroa97
</td>
</tr>
</table>
<pre>
There is a problem in clang-format 14 on how to interpret binary operators. It is not differentiating them with the angle brackets used in the templates. On the contrary, clang-format-18 interprets it correctly. Both using the same .clang-format.yml. The BreakBeforeBinaryOperators is in nonassigment and AlignOperands is in true.
clang-format-18
```
if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<T>>, std::string_view>
|| std::is_same_v<T, std::string>)
```
clang-format-14
```
if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<T>>,
std::string_view> || std::is_same_v<T, std::string>)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VE1vozwQ_jXmMgoCAwkcOCTpG-k97PaSe2TMAN4aG9kD3fz7lWnaptvubbVoJNB8PR_SILxXvUGsWXFgxUMkZhqsq7-LYT6pfkZnRbWLGtte6_OADkF5EDA522gcQRmQWph-01k3CoI0B2tgsM9AFpQhdJNDgkYZ4a5gJ3SCrPMx_E9hkbEEreo6dGhICVKmBxpwhGdFQ_gCYXqN0Dghn5A8zB7bABpKhOOkBaGP4fElI60hJ9yV8eMHWpu0fCfjQRFI6xxK0tcYDpYGmP0NGrwYEeL76fg66hjOA8LBoXg6YGcdHlZFj6-CghhlwFiz-jmiIRCmhb1WvVm7TPvaRG7GmCV7lux_IxmS2-QWyR4AQHVBlSf8OTlgvPTUsmzPsr3yl0D1srDs-JZ0ONoFL3K50Bdph6vREtfqmWX_heBHeGv05JTpL4vC51B6ofDxYbsj292N3PM4f7Fshahe5N6L-6Q-_9zzrwwIUH_w4O_ojdo6a6usEhHW6S7LsrTIyjwa6jKtyq4skjIR23YnKy6F3EkUbdmJrJBtpGqe8DzlSZ5yXuV5XGDD86ISpZB8t5UFyxMchdKx1ssYW9dHyvsZ6zQtt2kZadGg9utxc74azjgPd-7qMLBp5t6zPNHKk39fQYr0-kc4rhPFAyxpDt-Uf7siQcoasN2n045mp-uBaPLBFX5i_NQrGuYmlnZk_BQwbq_N5OwPlMT4aeXsGT_daC81_xUAAP__2dJ4qQ">