[PATCH] D61350: New clang-tidy check calling out uses of +new in Objective-C code

Michael Wyman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 15:33:36 PDT 2019


mwyman created this revision.
mwyman added reviewers: benhamilton, hokein.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.

Google's Objective-C style guide forbids calling or overriding +new to instantiate objects. This check warns on violations.

Style guide reference: https://google.github.io/styleguide/objcguide.html#do-not-use-new


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D61350

Files:
  clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp
  clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.h
  clang-tools-extra/clang-tidy/google/CMakeLists.txt
  clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/google-objc-avoid-nsobject-new.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/test/clang-tidy/google-objc-avoid-nsobject-new.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61350.197463.patch
Type: text/x-patch
Size: 13235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190430/7afa62c6/attachment.bin>


More information about the cfe-commits mailing list