<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/77601>77601</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Use of bitand on boolean operands
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          peter-harmann-tfs
      </td>
    </tr>
</table>

<pre>
    The following code gives a warning as expected:
```cpp
bool test();
int main() {
    return test() & test();
}
```
`[ use of bitwise '&' with boolean operands](warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical])`

However, this code also gives the same warning:
```cpp
bool test();
int main() {
    return test() bitand test();
}
```

I believe it would be best not to give the warning in the second case. There is no risk of the second case being accidental typo. It would be a nice way of signaling the bitwise AND is intentional to the compiler, rather than casting one of the bools to an int.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0U8GOozgQ_RpzKRGBCSEcOCQbRduXPfVqz8auhNpxbGQXYfrvR4b0pNUzlz6MhIwoql69evWsYqSrQ-xEfRT1KVMTDz50IzKGfFDhppzL-RKz3pu37nVAuHhr_UzuCtobhCvdMYKCWQWXgioCfh9RMxpRHURxEsVB7Ir10eO4RnrvLTBGFnIvZCuq4xonx3BT5NYwiOYRBwAIyFNwH6pAyN3vQERz-tT3-VkfYYoI_gI98UwRQchGyJ2QDczEAyRmqBz4EYNyJor6JOT-MZ2oDl8sB1Ef8_8eyTm5yKhM7i-59VfSyi7w7ZPicv7tZ7xjEPIv4IHiKrSy0T_U5gEhqhvCk9afFbonVs58SevlfIEeLeEdgRhmP1kDPUKPkcF5Bl4HWuZ59w-5dTzU3hnQKuIGXgcMCBTBeQgUvyX9PyVBj4v7tCaDjpUFfhv9Bl4-9FXgSKdObwkg-V7ZVJSg3td5-OeUGpFjdEzeJSC_ZGh_G8muWwmKBwzAg3KpOycU7_CdVxI9pjrlEtImM11l2qpVGXZlU2z3raxbmQ3dTte6Ne22rxuJjdkZub2Yuqyaqq3rujIZdbKQ26Isi7Iqd1WxaapL0fSl3NfFBXVViW2BN0V2Y-39tvHhmlGME3ZNsyvKzKoebVzutpQOZ1h-CinTVQ9dqsn76RrFtrAUOT5RmNhi9-9Pr6f1e_eLvbMp2G5gHmPyoDwLeb4SD1O_0f4m5DnhPV75GPz_qFnI88IiCnleWP4IAAD__4tLaXU">