[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 7 10:21:51 PDT 2019
gribozavr accepted this revision.
gribozavr added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:55
+
+// Return the string for the Objective-C message receiver. Keeps any generics
+// included in the receiver class type, which are stripped if the class type is
----------------
"Returns"
================
Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.h:19
+
+/// The check for Objective-C code not using +new to create object instances,
+/// and should not override +new in classes. Both are forbidden by Google's
----------------
It is unclear whether the check ensures that the code does not use +new, or whether it finds code that does not use +new, this description can be read both ways.
Try: This check finds Objective-C code that ...
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/google-objc-avoid-nsobject-new.rst:6
+
+Checks for calls to ``+new`` or overrides of it, which are prohibited by the
+Google Objective-C style guide.
----------------
"Finds calls to ..."
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61350/new/
https://reviews.llvm.org/D61350
More information about the cfe-commits
mailing list