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"
33 void check(
const ast_matchers::MatchFinder::MatchResult &
Result)
override;
40 bool isPossibleToBeOverridden(
const CXXMethodDecl *BaseMD);
46 bool isOverriddenByDerivedClass(
const CXXMethodDecl *BaseMD,
47 const CXXRecordDecl *DerivedRD);
51 std::map<std::string, bool> PossibleMap;
56 std::map<std::pair<std::string, std::string>,
bool> OverriddenMap;
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 ASTMatchers with Finder.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.