10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_VIRTUAL_NEAR_MISS_H 11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_VIRTUAL_NEAR_MISS_H 13 #include "../ClangTidy.h" 14 #include "llvm/ADT/DenseMap.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 llvm::DenseMap<const CXXMethodDecl *, bool> PossibleMap;
55 llvm::DenseMap<std::pair<const CXXMethodDecl *, const CXXRecordDecl *>,
bool>
58 const unsigned EditDistanceThreshold = 1;
65 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_VIRTUAL_NEAR_MISS_H void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
VirtualNearMissCheck(StringRef Name, ClangTidyContext *Context)
Base class for all clang-tidy checks.
Checks for near miss of virtual methods.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
static constexpr llvm::StringLiteral Name
llvm::Optional< llvm::Expected< tooling::AtomicChanges > > Result
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.