clang-tools 22.0.0git
clang::tidy::bugprone::CrtpConstructorAccessibilityCheck Class Reference

Detects error-prone Curiously Recurring Template Pattern usage, when the CRTP can be constructed outside itself and the derived class. More...

#include <CrtpConstructorAccessibilityCheck.h>

Inheritance diagram for clang::tidy::bugprone::CrtpConstructorAccessibilityCheck:
[legend]

Public Member Functions

 CrtpConstructorAccessibilityCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override

Detailed Description

Detects error-prone Curiously Recurring Template Pattern usage, when the CRTP can be constructed outside itself and the derived class.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/crtp-constructor-accessibility.html

Definition at line 21 of file CrtpConstructorAccessibilityCheck.h.

Constructor & Destructor Documentation

◆ CrtpConstructorAccessibilityCheck()

clang::tidy::bugprone::CrtpConstructorAccessibilityCheck::CrtpConstructorAccessibilityCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file CrtpConstructorAccessibilityCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::bugprone::CrtpConstructorAccessibilityCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::bugprone::CrtpConstructorAccessibilityCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
override

◆ registerMatchers()

void clang::tidy::bugprone::CrtpConstructorAccessibilityCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 90 of file CrtpConstructorAccessibilityCheck.cpp.

References registerMatchers().

Referenced by registerMatchers().


The documentation for this class was generated from the following files: