9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_VIRTUAL_NEAR_MISS_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_VIRTUAL_NEAR_MISS_H
12#include "../ClangTidyCheck.h"
13#include "llvm/ADT/DenseMap.h"
29 return LangOpts.CPlusPlus;
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;
llvm::SmallString< 256U > Name
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Checks for near miss of virtual methods.
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 AST matchers with Finder.
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override
Override this to disable registering matchers and PP callbacks if an invalid language version is bein...
VirtualNearMissCheck(StringRef Name, ClangTidyContext *Context)