[clang-tools-extra] [clang-tidy] Exclude bitwise operators in bugprone-non-zero-enum-to-bool-conversion (PR #65498)

Congcong Cai via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 6 18:47:08 PDT 2023


HerrCai0907 wrote:

explicit bit usage will not case false positive without this patch. Should we consider case of operator overloading?
```cpp
bool explicitBitUsage1(EStatus value) {
  return (value & SUCCESS);
}
bool explicitBitUsage2(EStatus value) {
  return (value | SUCCESS);
}
```


https://github.com/llvm/llvm-project/pull/65498


More information about the cfe-commits mailing list