Another correction to the LiveVariables commit (r143767, r143780).

Make test/Analysis/misc-ps.c test pass.

llvm-svn: 143790
This commit is contained in:
Anna Zaks 2011-11-05 05:20:59 +00:00
parent 84726dd72c
commit 04994959a3
1 changed files with 7 additions and 3 deletions

View File

@ -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;