Skip to content
Snippets Groups Projects
Commit 74b5edd7 authored by Argyrios Kyrtzidis's avatar Argyrios Kyrtzidis
Browse files

Simplify LookThroughStmt in LiveVariables.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143794 91177308-0d34-0410-b5e6-96231b3b80d8
parent 32bae37b
No related branches found
No related tags found
No related merge requests found
...@@ -232,18 +232,10 @@ static const VariableArrayType *FindVA(QualType Ty) { ...@@ -232,18 +232,10 @@ static const VariableArrayType *FindVA(QualType Ty) {
} }
static const Stmt *LookThroughStmt(const Stmt *S) { static const Stmt *LookThroughStmt(const Stmt *S) {
while (S) { if (const Expr *E = dyn_cast<Expr>(S))
if (const ParenExpr *ParenE = dyn_cast<ParenExpr>(S)) { return E->IgnoreParens();
S = ParenE->getSubExpr(); if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S))
continue; return OVE->IgnoreParens();
} else if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) {
S = OVE->getSourceExpr();
continue;
} else if (const Expr *E = dyn_cast<Expr>(S)) {
return E->IgnoreParens();
} else
break;
}
return S; return S;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment