[clang-tools-extra] [clang-tidy] Fixed bugprone-non-zero-enum-to-bool-conversion (PR #131407)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 3 11:00:53 PDT 2025
================
@@ -126,4 +126,10 @@ void testCustomOperator(CustomOperatorEnum e) {
if (!(e & E1)) {}
}
+enum EmptyEnum {};
+
+bool testCustomOperator(EmptyEnum value) {
----------------
PiotrZSL wrote:
Because this is enum without enumerators = can hold any value = usually used to work as strong type
https://github.com/llvm/llvm-project/pull/131407
More information about the cfe-commits
mailing list