10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
13 #include "../ClangTidy.h"
17 namespace readability {
36 void check(
const ast_matchers::MatchFinder::MatchResult &
Result)
override;
41 FunctionInfo() : Lines(0), Statements(0), Branches(0) {}
47 const unsigned LineThreshold;
48 const unsigned StatementThreshold;
49 const unsigned BranchThreshold;
51 llvm::DenseMap<const FunctionDecl *, FunctionInfo> FunctionInfos;
58 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
std::unique_ptr< ast_matchers::MatchFinder > Finder
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
Base class for all clang-tidy checks.
FunctionSizeCheck(StringRef Name, ClangTidyContext *Context)
Checks for large functions based on various metrics.
std::map< std::string, std::string > OptionMap
ClangTidyContext & Context
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register ASTMatchers with Finder.
void onEndOfTranslationUnit() override