10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_VIRTUAL_NEAR_MISS_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_VIRTUAL_NEAR_MISS_H
13 #include "../ClangTidy.h"
32 void check(
const ast_matchers::MatchFinder::MatchResult &
Result)
override;
39 bool isPossibleToBeOverridden(
const CXXMethodDecl *BaseMD);
45 bool isOverriddenByDerivedClass(
const CXXMethodDecl *BaseMD,
46 const CXXRecordDecl *DerivedRD);
50 std::map<const CXXMethodDecl *, bool> PossibleMap;
55 std::map<std::pair<const CXXMethodDecl *, const CXXRecordDecl *>,
bool>
58 const unsigned EditDistanceThreshold = 1;
65 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_VIRTUAL_NEAR_MISS_H
VirtualNearMissCheck(StringRef Name, ClangTidyContext *Context)
std::unique_ptr< ast_matchers::MatchFinder > Finder
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
Checks for near miss of virtual methods.
Base class for all clang-tidy checks.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.