diff options
author | John McCall <rjmccall@apple.com> | 2011-11-09 17:10:36 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-11-09 17:10:36 +0000 |
commit | 29928fc56304ca201fd43f1e9be8b1c9d30761ed (patch) | |
tree | 0e3dd1cf120fe11686b8a243e055812717bb6c2a /clang/lib/Analysis/LiveVariables.cpp | |
parent | 7240a9528246208488ccc6326ab21674026f302d (diff) | |
download | bcm5719-llvm-29928fc56304ca201fd43f1e9be8b1c9d30761ed.tar.gz bcm5719-llvm-29928fc56304ca201fd43f1e9be8b1c9d30761ed.zip |
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.
llvm-svn: 144190
Diffstat (limited to 'clang/lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | clang/lib/Analysis/LiveVariables.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index f0dbc532b2e..3a325009d4a 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/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; |