clang-tools 22.0.0git
|
Detect implicit and explicit casts of enum type into bool where enum type doesn't have a zero-value enumerator. More...
#include <NonZeroEnumToBoolConversionCheck.h>
Public Member Functions | |
NonZeroEnumToBoolConversionCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
Detect implicit and explicit casts of enum type into bool where enum type doesn't have a zero-value enumerator.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/non-zero-enum-to-bool-conversion.html
Definition at line 22 of file NonZeroEnumToBoolConversionCheck.h.
clang::tidy::bugprone::NonZeroEnumToBoolConversionCheck::NonZeroEnumToBoolConversionCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 33 of file NonZeroEnumToBoolConversionCheck.cpp.
|
override |
Definition at line 72 of file NonZeroEnumToBoolConversionCheck.cpp.
|
override |
Definition at line 45 of file NonZeroEnumToBoolConversionCheck.cpp.
|
override |
Definition at line 50 of file NonZeroEnumToBoolConversionCheck.cpp.
References clang::tidy::matchers::matchesAnyListedName().
|
override |
Definition at line 39 of file NonZeroEnumToBoolConversionCheck.cpp.
References clang::tidy::utils::options::serializeStringList().