aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRState.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-11-12 19:21:30 +0000
committerTed Kremenek <kremenek@apple.com>2008-11-12 19:21:30 +0000
commitd4931632946fe86fc2b09496f2b62443440a7da4 (patch)
treeb2e2c781ba996e12086d90e8cb2775949b5a866f /lib/Analysis/GRState.cpp
parent42577d145e2c6c3f77731645d442faa716f4c852 (diff)
GRStateRef:
- Rename SetSVal to BindLoc - Add BindDecl - Add BindExpr GRState: - Environment now binds to Stmt* instead of Expr*. This is needed for processing ObjCForCollectionStmt (essentially the declaration of the the 'element' variable can have an SVal attached to it). - BindDecl no longer accepts Expr* for the initialization value; use SVal* instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRState.cpp')
-rw-r--r--lib/Analysis/GRState.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index 57f9c6b279..dd296e0676 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -73,15 +73,10 @@ const GRState* GRStateManager::BindLoc(const GRState* St, Loc LV, SVal V) {
}
const GRState* GRStateManager::BindDecl(const GRState* St, const VarDecl* VD,
- Expr* Ex, unsigned Count) {
+ SVal* InitVal, unsigned Count) {
Store OldStore = St->getStore();
- Store NewStore;
+ Store NewStore = StoreMgr->BindDecl(OldStore, VD, InitVal, Count);
- if (Ex)
- NewStore = StoreMgr->BindDecl(OldStore, VD, Ex, GetSVal(St, Ex), Count);
- else
- NewStore = StoreMgr->BindDecl(OldStore, VD, Ex);
-
if (NewStore == OldStore)
return St;