summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2014-05-05 09:58:03 +0000
committerManuel Klimek <klimek@google.com>2014-05-05 09:58:03 +0000
commitdb5c09f0d9f57df91c2e1fe8325dd9a757c848cb (patch)
treebfc3c3e28ae4c265308d674aec9a1c1c03b5508f /lib/CodeGen/CodeGenFunction.cpp
parenta337b33ab39c631768c60449b5b2857bedabf487 (diff)
downloadclang-db5c09f0d9f57df91c2e1fe8325dd9a757c848cb.tar.gz
clang-db5c09f0d9f57df91c2e1fe8325dd9a757c848cb.tar.bz2
clang-db5c09f0d9f57df91c2e1fe8325dd9a757c848cb.tar.xz
Fix crash when resolving branch conditions for temporary destructor condition blocks.
Document and simplify ResolveCondition. 1. Introduce a temporary special case for temporary desctructors when resolving the branch condition - in an upcoming patch, alexmc will change temporary destructor conditions to not run through this logic, in which case we can remove this (marked as FIXME); this currently fixes a crash. 2. Simplify ResolveCondition; while documenting the function, I noticed that it always returns the last statement - either that statement is the condition itself (in which case the condition was returned anyway), or the rightmost leaf is returned; for correctness, the rightmost leaf must be evaluated anyway (which the CFG does in the last statement), thus we can just return the last statement in that case, too. Added an assert to verify the invariant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions