#include "CrtpConstructorAccessibilityCheck.h"
#include "../utils/LexerUtils.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::bugprone {
static bool hasPrivateConstructor(const CXXRecordDecl *RD) { … }
static bool isDerivedParameterBefriended(const CXXRecordDecl *CRTP,
const NamedDecl *Param) { … }
static bool isDerivedClassBefriended(const CXXRecordDecl *CRTP,
const CXXRecordDecl *Derived) { … }
static const NamedDecl *
getDerivedParameter(const ClassTemplateSpecializationDecl *CRTP,
const CXXRecordDecl *Derived) { … }
static std::vector<FixItHint>
hintMakeCtorPrivate(const CXXConstructorDecl *Ctor,
const std::string &OriginalAccess) { … }
void CrtpConstructorAccessibilityCheck::registerMatchers(MatchFinder *Finder) { … }
void CrtpConstructorAccessibilityCheck::check(
const MatchFinder::MatchResult &Result) { … }
bool CrtpConstructorAccessibilityCheck::isLanguageVersionSupported(
const LangOptions &LangOpts) const { … }
}