#include "UseEqualsDefaultCheck.h"
#include "../utils/LexerUtils.h"
#include "../utils/Matchers.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include <optional>
usingnamespaceclang::ast_matchers;
namespace clang::tidy::modernize {
static const char SpecialFunction[] = …;
static std::set<const FieldDecl *>
getAllNamedFields(const CXXRecordDecl *Record) { … }
static std::set<const Type *> getAllDirectBases(const CXXRecordDecl *Record) { … }
internal::Matcher<Expr> accessToFieldInVar(const FieldDecl *Field,
const ValueDecl *Var) { … }
static bool isCopyConstructorAndCanBeDefaulted(ASTContext *Context,
const CXXConstructorDecl *Ctor) { … }
static bool isCopyAssignmentAndCanBeDefaulted(ASTContext *Context,
const CXXMethodDecl *Operator) { … }
static bool bodyEmpty(const ASTContext *Context, const CompoundStmt *Body) { … }
UseEqualsDefaultCheck::UseEqualsDefaultCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void UseEqualsDefaultCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
namespace {
AST_MATCHER(CXXMethodDecl, isOutOfLine) { … }
}
void UseEqualsDefaultCheck::registerMatchers(MatchFinder *Finder) { … }
void UseEqualsDefaultCheck::check(const MatchFinder::MatchResult &Result) { … }
}