Issue |
130762
|
Summary |
[clang-tidy] non-zero-enum-to-bool-conversion should ignore enums with underlying type bool
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
RedBeard0531
|
For example, an enum like `enum class SnakesOnPlane : bool {}` is a reasonable way to express a strongly-typed bool to ensure that all callers of `void takeoff(SnakesOnPlane)` are intentional about whether that is really what they want to do. Unfortunately, that idiom runs afoul of the `non-zero-enum-to-bool-conversion` clang-tidy check, even though conversion to bool is intentionally part of the type.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs