[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 3 13:44:18 PST 2019


rjmccall added inline comments.


================
Comment at: clang/docs/AutomaticReferenceCounting.rst:1749
+instance, capturing an externally-retained variable in a block will retain the
+value when capturing it, and release it when the block is destroyed.
+
----------------
Nit-picks: `it's` should be `its`, `An` shouldn't be capitalized, and the comma before "and release it" is a splice.


================
Comment at: clang/docs/AutomaticReferenceCounting.rst:1779
+externally-retained, unless the variable was explicitly qualified with
+``__strong``. For instance, ``first_param`` is externally-retained below, but
+not ``second_param``:
----------------
I hadn't noticed the parameter-index feature.  Is that a good idea?  Surely if this level of control is needed, it would be better to add the attribute to each parameter individually — or still better, just use explicit ownership qualifiers to mark the exceptions.  And it creates all sorts of ugly questions about the indexing base and how it accounts for implicit parameters.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55865/new/

https://reviews.llvm.org/D55865





More information about the cfe-commits mailing list