9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
12#include "../ClangTidyCheck.h"
31 return LangOpts.CPlusPlus;
35 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
38 void diagnoseThrowLocations(
const CXXThrowExpr *ThrowExpr);
39 void diagnoseCatchLocations(
const CXXCatchStmt *CatchStmt,
41 bool isFunctionParameter(
const DeclRefExpr *DeclRefExpr);
42 bool isCatchVariable(
const DeclRefExpr *DeclRefExpr);
43 bool isFunctionOrCatchVar(
const DeclRefExpr *DeclRefExpr);
44 const bool CheckAnonymousTemporaries;
45 const bool WarnOnLargeObject;
46 const uint64_t MaxSizeOptions;
llvm::SmallString< 256U > Name
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
checks for locations that do not throw by value
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override
Override this to disable registering matchers and PP callbacks if an invalid language version is bein...
llvm::StringMap< ClangTidyValue > OptionMap