clang-tools 22.0.0git
clang::tidy::readability::ConvertMemberFunctionsToStatic Class Reference

This check finds C++ class methods than can be made static because they don't use the 'this' pointer. More...

#include <ConvertMemberFunctionsToStatic.h>

Inheritance diagram for clang::tidy::readability::ConvertMemberFunctionsToStatic:
[legend]

Public Member Functions

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

Detailed Description

This check finds C++ class methods than can be made static because they don't use the 'this' pointer.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/ readability-convert-member-functions-to-static.html

Definition at line 22 of file ConvertMemberFunctionsToStatic.h.

Constructor & Destructor Documentation

◆ ConvertMemberFunctionsToStatic()

clang::tidy::readability::ConvertMemberFunctionsToStatic::ConvertMemberFunctionsToStatic ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 24 of file ConvertMemberFunctionsToStatic.h.

Member Function Documentation

◆ check()

void clang::tidy::readability::ConvertMemberFunctionsToStatic::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::readability::ConvertMemberFunctionsToStatic::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 26 of file ConvertMemberFunctionsToStatic.h.

◆ registerMatchers()

void clang::tidy::readability::ConvertMemberFunctionsToStatic::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 81 of file ConvertMemberFunctionsToStatic.cpp.


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