Simplify LookThroughStmt in LiveVariables.cpp
llvm-svn: 143794
This commit is contained in:
parent
6437126f19
commit
6b4fa1b4d6
|
@ -232,18 +232,10 @@ static const VariableArrayType *FindVA(QualType Ty) {
|
|||
}
|
||||
|
||||
static const Stmt *LookThroughStmt(const Stmt *S) {
|
||||
while (S) {
|
||||
if (const ParenExpr *ParenE = dyn_cast<ParenExpr>(S)) {
|
||||
S = ParenE->getSubExpr();
|
||||
continue;
|
||||
} else if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) {
|
||||
S = OVE->getSourceExpr();
|
||||
continue;
|
||||
} else if (const Expr *E = dyn_cast<Expr>(S)) {
|
||||
if (const Expr *E = dyn_cast<Expr>(S))
|
||||
return E->IgnoreParens();
|
||||
} else
|
||||
break;
|
||||
}
|
||||
if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S))
|
||||
return OVE->IgnoreParens();
|
||||
return S;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue