Detect implicit and explicit conversions of enum to bool,
when enum doesn't have a enumerator with value equal to 0.
In theory such conversion should always return TRUE.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clang-tidy/bugprone/EnumToBoolConversionCheck.h | ||
---|---|---|
29 | Should language be checked for C++? | |
clang-tools-extra/docs/clang-tidy/checks/bugprone/enum-to-bool-conversion.rst | ||
7 | Please synchronize first statement with statement in Release Notes. Please use double back-ticks for language constructs. | |
50 | Please use single back-ticks for option values. Default value is usually placed after option description. |
Comment Actions
Ping, Rebase, Changed Option from Regexp to List, Improved documentation, Removed usage of deprecated API