10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
13 #include "../ClangTidy.h"
34 void check(
const ast_matchers::MatchFinder::MatchResult &
Result)
override;
37 void diagnoseThrowLocations(
const CXXThrowExpr *throwExpr);
38 void diagnoseCatchLocations(
const CXXCatchStmt *catchStmt,
40 bool isFunctionParameter(
const DeclRefExpr *declRefExpr);
41 bool isCatchVariable(
const DeclRefExpr *declRefExpr);
42 bool isFunctionOrCatchVar(
const DeclRefExpr *declRefExpr);
43 const bool CheckAnonymousTemporaries;
49 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
std::unique_ptr< ast_matchers::MatchFinder > Finder
checks for locations that do not throw by value
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register ASTMatchers with Finder.
Base class for all clang-tidy checks.
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
ThrowByValueCatchByReferenceCheck(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...