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

Checks that a derived class does not define the same (non virtual) method as a base class. More...

#include <DerivedMethodShadowingBaseMethodCheck.h>

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

Public Member Functions

 DerivedMethodShadowingBaseMethodCheck (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
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Checks that a derived class does not define the same (non virtual) method as a base class.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/derived-method-shadowing-base-method.html

Definition at line 21 of file DerivedMethodShadowingBaseMethodCheck.h.

Constructor & Destructor Documentation

◆ DerivedMethodShadowingBaseMethodCheck()

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

Definition at line 88 of file DerivedMethodShadowingBaseMethodCheck.cpp.

Member Function Documentation

◆ check()

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

Definition at line 109 of file DerivedMethodShadowingBaseMethodCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::bugprone::DerivedMethodShadowingBaseMethodCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 30 of file DerivedMethodShadowingBaseMethodCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::bugprone::DerivedMethodShadowingBaseMethodCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file DerivedMethodShadowingBaseMethodCheck.h.

◆ registerMatchers()

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

Definition at line 92 of file DerivedMethodShadowingBaseMethodCheck.cpp.


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