clang-tools 22.0.0git
clang::tidy::objc::SuperSelfCheck Class Reference

Finds invocations of -self on super instances in initializers of subclasses of NSObject and recommends calling a superclass initializer instead. More...

#include <SuperSelfCheck.h>

Inheritance diagram for clang::tidy::objc::SuperSelfCheck:
[legend]

Public Member Functions

 SuperSelfCheck (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

Finds invocations of -self on super instances in initializers of subclasses of NSObject and recommends calling a superclass initializer instead.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/objc/super-self.html

Definition at line 21 of file SuperSelfCheck.h.

Constructor & Destructor Documentation

◆ SuperSelfCheck()

clang::tidy::objc::SuperSelfCheck::SuperSelfCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file SuperSelfCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::objc::SuperSelfCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 85 of file SuperSelfCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::objc::SuperSelfCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file SuperSelfCheck.h.

◆ registerMatchers()

void clang::tidy::objc::SuperSelfCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 74 of file SuperSelfCheck.cpp.


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