xref: /llvm-project/clang-tools-extra/docs/clang-tidy/checks/objc/super-self.rst (revision 6e566bc5523f743bc34a7e26f050f1f2b4d699a8)
1.. title:: clang-tidy - objc-super-self
2
3objc-super-self
4===============
5
6Finds invocations of ``-self`` on super instances in initializers of subclasses
7of ``NSObject`` and recommends calling a superclass initializer instead.
8
9Invoking ``-self`` on super instances in initializers is a common programmer
10error when the programmer's original intent is to call a superclass
11initializer. Failing to call a superclass initializer breaks initializer
12chaining and can result in invalid object initialization.
13
14