[PATCH] D61808: [ObjC] Replace uses of the argument of a call to objc_autorelease with the result in MRR

Akira Hatanaka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 14:50:00 PDT 2019


ahatanak added a comment.

In D61808#1505023 <https://reviews.llvm.org/D61808#1505023>, @rjmccall wrote:

> The assumption that these methods return the receiver is not true without additional semantic assumptions about these methods, so the current behavior of unconditionally turning `[x autorelease]` into `objc_autorelease(x), x` seems quite broken.


Because it's possible to override an autorelease method and make the method return something other than the passed argument, for example?

If it's not possible to assume that the method returns the passed argument in MRR, the direction of this patch and https://reviews.llvm.org/D61970 is completely wrong.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61808





More information about the llvm-commits mailing list