From f3fb5c5395d382ffd24ec2675237fa9bdff6266e Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 9 Nov 2011 17:10:36 +0000 Subject: [PATCH] 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 --- lib/Analysis/LiveVariables.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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(S)) S = Ex->IgnoreParens(); + if (const ExprWithCleanups *EWC = dyn_cast(S)) { + S = EWC->getSubExpr(); + continue; + } if (const OpaqueValueExpr *OVE = dyn_cast(S)) { S = OVE->getSourceExpr(); continue; -- 2.50.1