aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/LiveVariables.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-11-09 17:10:36 +0000
committerJohn McCall <rjmccall@apple.com>2011-11-09 17:10:36 +0000
commitf3fb5c5395d382ffd24ec2675237fa9bdff6266e (patch)
tree93b841c2a00056e932a79599767c838fd1c2ea18 /lib/Analysis/LiveVariables.cpp
parentc9a237168cddc136ddba6e59b1bead5d5bf1ee95 (diff)
We don't add ExprWithCleanups to the CFG, and getSVal looks
through it, so we should look through it for the live-values analysis as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144190 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LiveVariables.cpp')
-rw-r--r--lib/Analysis/LiveVariables.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp
index f0dbc532b2..3a325009d4 100644
--- a/lib/Analysis/LiveVariables.cpp
+++ b/lib/Analysis/LiveVariables.cpp
@@ -235,6 +235,10 @@ static const Stmt *LookThroughStmt(const Stmt *S) {
while (S) {
if (const Expr *Ex = dyn_cast<Expr>(S))
S = Ex->IgnoreParens();
+ if (const ExprWithCleanups *EWC = dyn_cast<ExprWithCleanups>(S)) {
+ S = EWC->getSubExpr();
+ continue;
+ }
if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) {
S = OVE->getSourceExpr();
continue;