Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit f3fb5c5

Browse files
committed
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
1 parent c9a2371 commit f3fb5c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lib/Analysis/LiveVariables.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ static const Stmt *LookThroughStmt(const Stmt *S) {
235235
while (S) {
236236
if (const Expr *Ex = dyn_cast<Expr>(S))
237237
S = Ex->IgnoreParens();
238+
if (const ExprWithCleanups *EWC = dyn_cast<ExprWithCleanups>(S)) {
239+
S = EWC->getSubExpr();
240+
continue;
241+
}
238242
if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) {
239243
S = OVE->getSourceExpr();
240244
continue;

0 commit comments

Comments
 (0)