[PATCH] D51564: Distinguish `__block` variables that are captured by escaping blocks from those that aren't

2018-09-08 Thread Akira Hatanaka via Phabricator via cfe-commits
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:

[PATCH] D51564: Distinguish `__block` variables that are captured by escaping blocks from those that aren't

2018-09-05 Thread John McCall via Phabricator via cfe-commits
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

[PATCH] D51564: Distinguish `__block` variables that are captured by escaping blocks from those that aren't

2018-09-05 Thread Akira Hatanaka via Phabricator via cfe-commits
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 =

[PATCH] D51564: Distinguish `__block` variables that are captured by escaping blocks from those that aren't

2018-09-05 Thread Akira Hatanaka via Phabricator via cfe-commits
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:

[PATCH] D51564: Distinguish `__block` variables that are captured by escaping blocks from those that aren't

2018-09-01 Thread John McCall via Phabricator via cfe-commits
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()

[PATCH] D51564: Distinguish `__block` variables that are captured by escaping blocks from those that aren't

2018-08-31 Thread Akira Hatanaka via Phabricator via cfe-commits
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