diff options
Diffstat (limited to 'docs/clang-tidy/checks/objc-super-self.rst')
-rw-r--r-- | docs/clang-tidy/checks/objc-super-self.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/clang-tidy/checks/objc-super-self.rst b/docs/clang-tidy/checks/objc-super-self.rst new file mode 100644 index 00000000..ed0bb295 --- /dev/null +++ b/docs/clang-tidy/checks/objc-super-self.rst @@ -0,0 +1,13 @@ +.. title:: clang-tidy - objc-super-self + +objc-super-self +=============== + +Finds invocations of ``-self`` on super instances in initializers of subclasses +of ``NSObject`` and recommends calling a superclass initializer instead. + +Invoking ``-self`` on super instances in initializers is a common programmer +error when the programmer's original intent is to call a superclass +initializer. Failing to call a superclass initializer breaks initializer +chaining and can result in invalid object initialization. + |