]> granicus.if.org Git - clang/commit
[CodeGen][ObjC] Use the type of the captured field of the enclosing
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 14 Feb 2017 06:46:55 +0000 (06:46 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Tue, 14 Feb 2017 06:46:55 +0000 (06:46 +0000)
commitc644cb6f1e7f85c9b918b6d4917dd161aa207960
treeec10f7c2e6124a05a77442e75086e8e2bd49016e
parent0c7e6cdfd87d1b156842c2a67a06f6965a81059c
[CodeGen][ObjC] Use the type of the captured field of the enclosing
block or lambda.

This is a follow-up to r281682, which fixed a bug in computeBlockInfo
where the captured VarDecl's type, rather than the captured field type
of the enclosing lambda or block, was used to compute the layout of a
block.

This commit makes similar changes to enterBlockScope. This is necessary
to correctly determine whether a block capture requires cleanup.

rdar://problem/30388124

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295034 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBlocks.cpp
test/CodeGenObjCXX/lambda-expressions.mm