clang-tools 22.0.0git
|
This check finds Objective-C code that uses +new to create object instances, or overrides +new in classes. More...
#include <AvoidNSObjectNewCheck.h>
Public Member Functions | |
AvoidNSObjectNewCheck (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 |
This check finds Objective-C code that uses +new to create object instances, or overrides +new in classes.
Both are forbidden by Google's Objective-C style guide.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/google/objc-avoid-nsobject-new.html
Definition at line 22 of file AvoidNSObjectNewCheck.h.
|
inline |
Definition at line 24 of file AvoidNSObjectNewCheck.h.
|
override |
Definition at line 105 of file AvoidNSObjectNewCheck.cpp.
References clang::tidy::google::objc::getCallFixItHint(), and clang::tidy::google::objc::isMessageExpressionInsideMacro().
|
inlineoverride |
Definition at line 26 of file AvoidNSObjectNewCheck.h.
|
override |
Definition at line 94 of file AvoidNSObjectNewCheck.cpp.