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.
llvm-svn: 59152
diff --git a/clang/lib/Analysis/GRState.cpp b/clang/lib/Analysis/GRState.cpp
index 57f9c6b..dd296e0 100644
--- a/clang/lib/Analysis/GRState.cpp
+++ b/clang/lib/Analysis/GRState.cpp
@@ -73,15 +73,10 @@
}
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;