[cfe-commits] r73995 - in /cfe/trunk: include/clang/Analysis/PathSensitive/GRState.h lib/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Tue Jun 23 13:27:53 PDT 2009
Author: kremenek
Date: Tue Jun 23 15:27:53 2009
New Revision: 73995
URL: http://llvm.org/viewvc/llvm-project?rev=73995&view=rev
Log:
Remove GRStateManager::BindDecl() and GRStateManager::BindDeclWithInit().
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h
cfe/trunk/lib/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h?rev=73995&r1=73994&r2=73995&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h Tue Jun 23 15:27:53 2009
@@ -218,6 +218,10 @@
return bindExpr(Ex, V, true, false);
}
+ const GRState *bindDecl(const VarDecl* VD, SVal IVal) const;
+
+ const GRState *bindDeclWithNoInit(const VarDecl* VD) const;
+
const GRState *bindLoc(Loc location, SVal V) const;
const GRState *bindLoc(SVal location, SVal V) const;
@@ -498,16 +502,6 @@
StoreManager& getStoreManager() { return *StoreMgr; }
ConstraintManager& getConstraintManager() { return *ConstraintMgr; }
- const GRState* BindDecl(const GRState* St, const VarDecl* VD, SVal IVal) {
- // Store manager should return a persistent state.
- return StoreMgr->BindDecl(St, VD, IVal);
- }
-
- const GRState* BindDeclWithNoInit(const GRState* St, const VarDecl* VD) {
- // Store manager should return a persistent state.
- return StoreMgr->BindDeclWithNoInit(St, VD);
- }
-
const GRState* RemoveDeadBindings(const GRState* St, Stmt* Loc,
SymbolReaper& SymReaper);
@@ -709,6 +703,14 @@
return Mgr->StoreMgr->BindCompoundLiteral(this, CL, V);
}
+inline const GRState *GRState::bindDecl(const VarDecl* VD, SVal IVal) const {
+ return Mgr->StoreMgr->BindDecl(this, VD, IVal);
+}
+
+inline const GRState *GRState::bindDeclWithNoInit(const VarDecl* VD) const {
+ return Mgr->StoreMgr->BindDeclWithNoInit(this, VD);
+}
+
inline const GRState *GRState::bindExpr(const Stmt* Ex, SVal V, bool isBlkExpr,
bool Invalidate) const {
return Mgr->BindExpr(this, Ex, V, isBlkExpr, Invalidate);
Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=73995&r1=73994&r2=73995&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Tue Jun 23 15:27:53 2009
@@ -2247,7 +2247,7 @@
InitVal = ValMgr.getConjuredSymbolVal(InitEx, Count);
}
- state = StateMgr.BindDecl(state, VD, InitVal);
+ state = state->bindDecl(VD, InitVal);
// The next thing to do is check if the GRTransferFuncs object wants to
// update the state based on the new binding. If the GRTransferFunc
@@ -2257,7 +2257,7 @@
InitVal);
}
else {
- state = StateMgr.BindDeclWithNoInit(state, VD);
+ state = state->bindDeclWithNoInit(VD);
MakeNode(Dst, DS, *I, state);
}
}
More information about the cfe-commits
mailing list