#include "ConvertMemberFunctionsToStatic.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::readability {
AST_MATCHER(CXXMethodDecl, isStatic) { … }
AST_MATCHER(CXXMethodDecl, hasTrivialBody) { … }
AST_MATCHER(CXXMethodDecl, isOverloadedOperator) { … }
AST_MATCHER(CXXRecordDecl, hasAnyDependentBases) { … }
AST_MATCHER(CXXMethodDecl, isTemplate) { … }
AST_MATCHER(CXXMethodDecl, isDependentContext) { … }
AST_MATCHER(CXXMethodDecl, isInsideMacroDefinition) { … }
AST_MATCHER_P(CXXMethodDecl, hasCanonicalDecl,
ast_matchers::internal::Matcher<CXXMethodDecl>, InnerMatcher) { … }
AST_MATCHER(CXXMethodDecl, usesThis) { … }
void ConvertMemberFunctionsToStatic::registerMatchers(MatchFinder *Finder) { … }
static StringRef getStringFromRange(SourceManager &SourceMgr,
const LangOptions &LangOpts,
SourceRange Range) { … }
static SourceRange getLocationOfConst(const TypeSourceInfo *TSI,
SourceManager &SourceMgr,
const LangOptions &LangOpts) { … }
void ConvertMemberFunctionsToStatic::check(
const MatchFinder::MatchResult &Result) { … }
}