10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IMPLICIT_BOOL_CAST_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IMPLICIT_BOOL_CAST_H
13 #include "../ClangTidy.h"
17 namespace readability {
29 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
32 void handleCastToBool(
const ImplicitCastExpr *CastExpression,
33 const Stmt *ParentStatement, ASTContext &Context);
34 void handleCastFromBool(
const ImplicitCastExpr *CastExpression,
35 const ImplicitCastExpr *FurtherImplicitCastExpression,
38 bool AllowConditionalIntegerCasts;
39 bool AllowConditionalPointerCasts;
46 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IMPLICIT_BOOL_CAST_H
std::unique_ptr< ast_matchers::MatchFinder > Finder
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
Base class for all clang-tidy checks.
ImplicitBoolCastCheck(StringRef Name, ClangTidyContext *Context)
std::map< std::string, std::string > OptionMap
ClangTidyContext & Context
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
Checks for use of implicit bool casts in expressions.
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.