diff options
| author | Ted Kremenek <kremenek@apple.com> | 2011-07-29 21:18:37 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2011-07-29 21:18:37 +0000 |
| commit | dc492c29f78363a31249fd94cc1efd01d7bcdf1f (patch) | |
| tree | 5af5174004d2f1908ab550143691c6f4505a4480 /clang | |
| parent | cf36b0c64d84ff7e1ba0c85490ecbcef08192715 (diff) | |
| download | bcm5719-llvm-dc492c29f78363a31249fd94cc1efd01d7bcdf1f.tar.gz bcm5719-llvm-dc492c29f78363a31249fd94cc1efd01d7bcdf1f.zip | |
[analyzer] Remove recursive visitation in ExprEngine::VisitCastExpr because it isn't needed anymore.
llvm-svn: 136520
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 6c1a8e8dd84..3c4c078eb0d 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -2019,14 +2019,13 @@ void ExprEngine::VisitObjCMessage(const ObjCMessage &msg, void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, ExplodedNode *Pred, ExplodedNodeSet &Dst) { - ExplodedNodeSet S1; - Visit(Ex, Pred, S1); - ExplodedNodeSet S2; - getCheckerManager().runCheckersForPreStmt(S2, S1, CastE, *this); + ExplodedNodeSet dstPreStmt; + getCheckerManager().runCheckersForPreStmt(dstPreStmt, Pred, CastE, *this); if (CastE->getCastKind() == CK_LValueToRValue || CastE->getCastKind() == CK_GetObjCProperty) { - for (ExplodedNodeSet::iterator I = S2.begin(), E = S2.end(); I!=E; ++I) { + for (ExplodedNodeSet::iterator I = dstPreStmt.begin(), E = dstPreStmt.end(); + I!=E; ++I) { ExplodedNode *subExprNode = *I; const GRState *state = GetState(subExprNode); evalLoad(Dst, CastE, subExprNode, state, state->getSVal(Ex)); @@ -2041,7 +2040,9 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, if (const ExplicitCastExpr *ExCast=dyn_cast_or_null<ExplicitCastExpr>(CastE)) T = ExCast->getTypeAsWritten(); - for (ExplodedNodeSet::iterator I = S2.begin(), E = S2.end(); I != E; ++I) { + for (ExplodedNodeSet::iterator I = dstPreStmt.begin(), E = dstPreStmt.end(); + I != E; ++I) { + Pred = *I; switch (CastE->getCastKind()) { |

