[cfe-commits] r143794 - /cfe/trunk/lib/Analysis/LiveVariables.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Sat Nov 5 00:03:54 PDT 2011
Author: akirtzidis
Date: Sat Nov 5 02:03:54 2011
New Revision: 143794
URL: http://llvm.org/viewvc/llvm-project?rev=143794&view=rev
Log:
Simplify LookThroughStmt in LiveVariables.cpp
Modified:
cfe/trunk/lib/Analysis/LiveVariables.cpp
Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/LiveVariables.cpp?rev=143794&r1=143793&r2=143794&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/LiveVariables.cpp (original)
+++ cfe/trunk/lib/Analysis/LiveVariables.cpp Sat Nov 5 02:03:54 2011
@@ -232,18 +232,10 @@
}
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)) {
- return E->IgnoreParens();
- } else
- break;
- }
+ if (const Expr *E = dyn_cast<Expr>(S))
+ return E->IgnoreParens();
+ if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S))
+ return OVE->IgnoreParens();
return S;
}
More information about the cfe-commits
mailing list