diff options
author | Anna Zaks <ganna@apple.com> | 2011-11-05 05:20:59 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-11-05 05:20:59 +0000 |
commit | 04994959a37501d74a49888a77986b92917ef869 (patch) | |
tree | d568bdd38d588ff3056bf3c34c6e8db7de81c1f1 /clang/lib/Analysis/LiveVariables.cpp | |
parent | 84726dd72c8cef8dace8120f2c0bc591983d051d (diff) | |
download | bcm5719-llvm-04994959a37501d74a49888a77986b92917ef869.tar.gz bcm5719-llvm-04994959a37501d74a49888a77986b92917ef869.zip |
Another correction to the LiveVariables commit (r143767, r143780).
Make test/Analysis/misc-ps.c test pass.
llvm-svn: 143790
Diffstat (limited to 'clang/lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | clang/lib/Analysis/LiveVariables.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index ccb301e58eb..aa4626b2056 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/lib/Analysis/LiveVariables.cpp @@ -233,11 +233,15 @@ static const VariableArrayType *FindVA(QualType Ty) { static const Stmt *LookThroughStmt(const Stmt *S) { while (S) { - if (const ParenExpr *ParenE = dyn_cast<ParenExpr>(S)) + if (const ParenExpr *ParenE = dyn_cast<ParenExpr>(S)) { S = ParenE->getSubExpr(); - else if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) + continue; + } else if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) { S = OVE->getSourceExpr(); - else + continue; + } else if (const Expr *E = dyn_cast<Expr>(S)) { + return E->IgnoreParens(); + } else break; } return S; |