summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commite9ff97b850b71d1fda78f9e0a9ddf24d42de7aee (patch)
tree199b052e6a18868e8a8c9c5286b17d7234ef2a5f /clang/lib
parentd26e9e7f7c4624c631de735a89a324d97927b7fa (diff)
downloadbcm5719-llvm-e9ff97b850b71d1fda78f9e0a9ddf24d42de7aee.tar.gz
bcm5719-llvm-e9ff97b850b71d1fda78f9e0a9ddf24d42de7aee.zip
[analyzer] Remove the ProgramState argument from ExprEngine::evalBind; we were ignoring it anyway. No functionality change.
llvm-svn: 138720
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp12
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp3
2 files changed, 5 insertions, 10 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 59ca90ac588..1a32d43d4d5 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/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,
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index a4e640c0e98..47debad09c3 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -361,8 +361,7 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
Builder->getCurrentBlockCount());
}
- evalBind(Dst, DS, N, state,
- loc::MemRegionVal(state->getRegion(VD, LC)), InitVal, true);
+ evalBind(Dst, DS, N, state->getLValue(VD, LC), InitVal, true);
}
else {
MakeNode(Dst, DS, N, state->bindDeclWithNoInit(state->getRegion(VD, LC)));
OpenPOWER on IntegriCloud