[PATCH] D77571: Add ClangTidy check to find calls to NSInvocation methods under ARC that don't have proper object argument lifetimes.

Michael Wyman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 10:51:32 PDT 2020


mwyman created this revision.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.
mwyman added reviewers: stephanemoore, benhamilton, dmaclach.
mwyman added a project: clang-tools-extra.
mwyman edited the summary of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77571

Files:
  clang-tools-extra/clang-tidy/objc/CMakeLists.txt
  clang-tools-extra/clang-tidy/objc/NsinvocationArgumentLifetimeCheck.cpp
  clang-tools-extra/clang-tidy/objc/NsinvocationArgumentLifetimeCheck.h
  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
  clang-tools-extra/test/clang-tidy/checkers/objc-nsinvocation-argument-lifetime.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77571.255401.patch
Type: text/x-patch
Size: 14162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200406/84f6f8f8/attachment-0001.bin>


More information about the cfe-commits mailing list