SharonXu added a comment.
Hi @ahatanak , @rjmccall, we found that this diff causes an issue:
When -fobjc-arc is enabled, if a block is passed as an argument to a function
whose corresponding parameter type is && rvalue and attributed as noescape, the
object captured by the block can get destruc
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc9a52de00260: [CodeGen] Simplify the way lifetime of block
captures is extended (authored by ahatanak).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81624/n
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
This is a great improvement, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81624/new/
https://reviews.llvm.org/D81624
___
ahatanak added a comment.
To clarify my comment, the lifetime of the block capture in `test22` gets
extended to the end of the enclosing scope, but of course not beyond the end of
the return statement.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/
ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
ahatanak added a project: clang.
Herald added subscribers: ributzka, jfb, dexonsmith, jkorous.
Rather than pushing inactive cleanups for the block captures at the entry of a
full expression and activating them during the creatio