<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54539>54539</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] Logical AND sometimes confused for rvalue reference
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jbms
</td>
</tr>
</table>
<pre>
Input:
```c++
template <typename Foo>
constexpr bool X = A && B;
```
`clang-format -style=Google` output using `clang-format` version 13.0.1:
```c++
template <typename Foo>
constexpr bool X = A&& B;
```
Removing the template prefix avoids the problem:
```c++
constexpr bool X = A && B;
```
This issue is also present in clang-format built from the more recent a54d028895c91da356a4aaf30e27a5a5b90dd313.
Strangely, the version of clang-format on compiler explorer does not exhibit the issue. However I am not sure what version that is.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1Uk1v2zAM_TX2haihSJETH3xImnUrMOyw7bCrbNG2CskyJDlp_v1oF9nWngoUAwiZX3jvkXTj9bV-HKc5ZeKQsVPGbm_JXqzN-HGxNZvQTVYlhEzcp-uEo3IID95n4tNLQ-vHmPB5CtB4b-EXNZ7gABkvyeCYieMb-DecrVVjf9f54FSCu5iuFgnhs_c9OSUDPyfSCnM0Yw9v-pf6GUM0foSNKFix-Z8zvW-k7-j8edGaBoQ_TFPAzjyDOnuj41qagm8suncJ_tCOfw4mgolxRnpB2egXNRHHBGaEV-tvZmMTdMG7VaLzASFgu7QqudWM7_eVbKuNVkKWaqtUJxjynZJKNhXTWtAR_qX-kQKho71m_H5FvB3Ld6-JKdV6NxmLAWhOS8QBtMcIo0-UGUxj0oqwDlIAfPEXJDR4BOXWpjiT2MtAYDeStAQmFrmuha5EpfJkksU6k8dXP5E8wVffm1ZZOHw7QfQOk3HETWvv5ogaqBHCWdl5WUeHAccW8znYekhpissJ-QNZb9IwNwVNQoG159vnjm79hG2icJUfyZFbKap8qEvWlIJz3G9RlZpvN6VketPpkjdyh7syt6pBGxfRGecjXl42QD7pzk3NGedMcMmY3PFdUe42gkmxr6q95rwtsy1Dp4wtFh2FD30e6lVSM_eRitbEFP8WVYymH3Hd0YKv5jT4UD81LuYrb73q_g3bhE3V">