[clang-tidy] Add check to find calls to NSInvocation methods under ARC that don't...
authorMichael Wyman <michael@mwyman.com>
Sun, 5 Apr 2020 07:28:34 +0000 (00:28 -0700)
committerMichael Wyman <michael@mwyman.com>
Fri, 10 Apr 2020 15:51:21 +0000 (08:51 -0700)
commit89f1321fe4ef203a4674213280b430a274dc2001
treeae506c8975d8bf93c05602674e75af4b8cbfe6ef
parent65b8b643b4ba75a2712ddc210aeaa7c6527f3bb4
[clang-tidy] Add check to find calls to NSInvocation methods under ARC that don't have proper object argument lifetimes.

Summary: This check is similar to an ARC Migration check that warned about this incorrect usage under ARC, but most projects are no longer undergoing migration from pre-ARC code. The documentation for NSInvocation is not explicit about these requirements and incorrect usage has been found in many of our projects.

Reviewers: stephanemoore, benhamilton, dmaclach, alexfh, aaron.ballman, hokein, njames93

Reviewed By: stephanemoore, benhamilton, aaron.ballman

Subscribers: xazax.hun, Eugene.Zelenko, mgorny, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D77571
clang-tools-extra/clang-tidy/objc/CMakeLists.txt
clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/objc/ObjCTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/objc-nsinvocation-argument-lifetime.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/objc-nsinvocation-argument-lifetime.m [new file with mode: 0644]