[PATCH] D81624: [CodeGen] Simplify the way lifetime of block captures is extended

Sharon Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 20 14:11:56 PDT 2021


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 destructed before the block invocation.  
More details and code example is in https://bugs.llvm.org/show_bug.cgi?id=50043 we filed.

We've tried locally reverted this patch, and the test cases mentioned in that bug report passed successfully. I am wondering could you please take a look at the bug report and see if you have a quick fix or something? Thanks!!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81624



More information about the cfe-commits mailing list