[cfe-commits] r136520 - /cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp

Ted Kremenek kremenek at apple.com
Fri Jul 29 14:18:37 PDT 2011


Author: kremenek
Date: Fri Jul 29 16:18:37 2011
New Revision: 136520

URL: http://llvm.org/viewvc/llvm-project?rev=136520&view=rev
Log:
[analyzer] Remove recursive visitation in ExprEngine::VisitCastExpr because it isn't needed anymore.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=136520&r1=136519&r2=136520&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Fri Jul 29 16:18:37 2011
@@ -2019,14 +2019,13 @@
 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 @@
   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()) {





More information about the cfe-commits mailing list