]> granicus.if.org Git - clang/commit
Fix a subtle bug with cleanups: when activating
authorJohn McCall <rjmccall@apple.com>
Thu, 10 Nov 2011 09:22:44 +0000 (09:22 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 10 Nov 2011 09:22:44 +0000 (09:22 +0000)
commitb99785bdd1cc9ce1ba4f94eeb871faba1a22e95f
tree8a0ad8ac3de7a387af04d5796cc17b8cbc6bcf74
parentc430ef4f92eedea7d3378f05a2b05982ed3713dc
Fix a subtle bug with cleanups:  when activating
a previously-inactive cleanup, not only do we need a
flag variable, but we should also force the cleanup to
query the flag variable.  However, we only need to do
this when we're activating in a context that's
conditionally executed;  otherwise, we may safely
assume that the cleanup is dominated by the activation
point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144271 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCleanup.cpp
test/CodeGenCXX/blocks.cpp
test/CodeGenObjC/arc-blocks.m
test/CodeGenObjC/arc-foreach.m