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 | 38f0b5a611a1776bb5996c56902b64549d093603 (patch) | |
tree | 511ad2adf8e889b159c669c7c32dcd2c1e6df355 /lib/Analysis/LiveVariables.cpp | |
parent | e1e73670b383163e22d5827cfe71e9ba2184818b (diff) |
Another correction to the LiveVariables commit (r143767, r143780).
Make test/Analysis/misc-ps.c test pass.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | lib/Analysis/LiveVariables.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp index ccb301e58e..aa4626b205 100644 --- a/lib/Analysis/LiveVariables.cpp +++ b/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; |