[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 🔍
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 09:28:35 PDT 2019
Eugene.Zelenko added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:61
+ // Check if any of the superclasses of the class match.
+ for (const auto *SuperClass = Node.getClassInterface()->getSuperClass();
+ SuperClass != nullptr; SuperClass = SuperClass->getSuperClass()) {
----------------
Please don't use auto where type is not obvious.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:110
+ Finds invocations of -self on super instances in initializers of subclasses
+ of NSObject and recommends calling a superclass initializer instead.
+
----------------
Please enclose NSObject in ``. Probably same for -self if this is language construct.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/objc-super-self.rst:6
+
+Finds invocations of -self on super instances (`[super self]`) in initializers
+of subclasses of NSObject and recommends invoking a superclass initializer
----------------
Please synchronize with Release Notes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59806/new/
https://reviews.llvm.org/D59806
More information about the cfe-commits
mailing list