aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngine.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2011-08-28 06:02:28 +0000
committerJordy Rose <jediknil@belkadan.com>2011-08-28 06:02:28 +0000
commit93bd5ca766c4d7906878f4ffe76ce1b2080e540b (patch)
tree3cf25426fc5d74a72533bce31c88d57d98f3b772 /lib/StaticAnalyzer/Core/ExprEngine.cpp
parentfe27971d54d26997149d6b84057f04ff398d1d5d (diff)
[analyzer] Remove the ProgramState argument from ExprEngine::evalBind; we were ignoring it anyway. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngine.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 59ca90ac58..1a32d43d4d 100644
--- a/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -1276,12 +1276,8 @@ void ExprEngine::VisitMemberExpr(const MemberExpr *M, ExplodedNode *Pred,
/// evalBind - Handle the semantics of binding a value to a specific location.
/// This method is used by evalStore and (soon) VisitDeclStmt, and others.
void ExprEngine::evalBind(ExplodedNodeSet &Dst, const Stmt *StoreE,
- ExplodedNode *Pred, const ProgramState *state,
- SVal location, SVal Val, bool atDeclInit) {
-
- // FIXME: We probably shouldn't be passing a state and then dropping it on the
- // floor, but while we are, we can at least assert that we're doing it right.
- assert(state == Pred->getState());
+ ExplodedNode *Pred,
+ SVal location, SVal Val, bool atDeclInit) {
// Do a previsit of the bind.
ExplodedNodeSet CheckedSet;
@@ -1291,7 +1287,7 @@ void ExprEngine::evalBind(ExplodedNodeSet &Dst, const Stmt *StoreE,
for (ExplodedNodeSet::iterator I = CheckedSet.begin(), E = CheckedSet.end();
I!=E; ++I) {
- state = (*I)->getState();
+ const ProgramState *state = (*I)->getState();
if (atDeclInit) {
const VarRegion *VR =
@@ -1346,7 +1342,7 @@ void ExprEngine::evalStore(ExplodedNodeSet &Dst, const Expr *AssignE,
ProgramPoint::PostStoreKind);
for (ExplodedNodeSet::iterator NI=Tmp.begin(), NE=Tmp.end(); NI!=NE; ++NI)
- evalBind(Dst, StoreE, *NI, (*NI)->getState(), location, Val);
+ evalBind(Dst, StoreE, *NI, location, Val);
}
void ExprEngine::evalLoad(ExplodedNodeSet &Dst, const Expr *Ex,