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

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 6 21:29:29 PDT 2023


PiotrZSL wrote:

> explicit bit usage will not case false positive without this patch. Should we consider case of operator overloading?

Yes, thats a side effect due to implicit casting enums to integers. I added tests because those were missing, then I implemented version with cxxOverloadCallExpr and changed it into more generic version by using binaryOperation.
If you want, then yes, I can reduce this back to overload operators calls only.

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


More information about the cfe-commits mailing list