9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
12#include "../ClangTidyCheck.h"
41 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
44 const std::optional<unsigned> LineThreshold;
45 const std::optional<unsigned> StatementThreshold;
46 const std::optional<unsigned> BranchThreshold;
47 const std::optional<unsigned> ParameterThreshold;
48 const std::optional<unsigned> NestingThreshold;
49 const std::optional<unsigned> VariableThreshold;
51 static constexpr std::optional<unsigned> DefaultLineThreshold = std::nullopt;
52 static constexpr std::optional<unsigned> DefaultStatementThreshold = 800U;
53 static constexpr std::optional<unsigned> DefaultBranchThreshold =
55 static constexpr std::optional<unsigned> DefaultParameterThreshold =
57 static constexpr std::optional<unsigned> DefaultNestingThreshold =
59 static constexpr std::optional<unsigned> DefaultVariableThreshold =
llvm::SmallString< 256U > Name
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Checks for large functions based on various metrics.
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
llvm::StringMap< ClangTidyValue > OptionMap