This revision was automatically updated to reflect the committed changes.
Closed by commit rL341754: Distinguish `__block` variables that are captured by
escaping blocks (authored by ahatanak, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
LGTM.
Comment at: include/clang/AST/Decl.h:977
+
+unsigned EscapingByref : 1;
};
ahatanak wrote:
> rjmccall wrote:
> > This doesn't actually seem
ahatanak added inline comments.
Comment at: include/clang/AST/Decl.h:977
+
+unsigned EscapingByref : 1;
};
rjmccall wrote:
> This doesn't actually seem to be initialized anywhere.
VarDecl's constructor in Decl.cpp initializes it to false.
```
AllBits =
ahatanak updated this revision to Diff 164069.
ahatanak marked 11 inline comments as done.
ahatanak added a comment.
Address review comments. Fix bugs in the handling of `__block` variables that
have reference types.
Repository:
rC Clang
https://reviews.llvm.org/D51564
Files:
rjmccall added inline comments.
Comment at: include/clang/AST/Decl.h:977
+
+unsigned EscapingByref : 1;
};
This doesn't actually seem to be initialized anywhere.
Comment at: include/clang/AST/Decl.h:1422
+
+ bool isNonEscapingByref()
ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
Herald added a subscriber: dexonsmith.
This patch changes the way `__block` variables that aren't captured by escaping
blocks are handled:
- Since non-escaping blocks on the stack never get copied to the heap (see