private:
- // Methods that query & manipulate the Environment.
- SVal GetSVal(const GRState* St, const Stmt* Ex) {
- return St->getEnvironment().GetSVal(Ex, ValueMgr);
- }
-
- SVal GetSValAsScalarOrLoc(const GRState* state, const Stmt *S) {
- if (const Expr *Ex = dyn_cast<Expr>(S)) {
- QualType T = Ex->getType();
- if (Loc::IsLocType(T) || T->isIntegerType())
- return GetSVal(state, S);
- }
-
- return UnknownVal();
- }
-
SVal GetBlkExprSVal(const GRState* St, const Stmt* Ex) {
return St->getEnvironment().GetBlkExprSVal(Ex, ValueMgr);
}
void iterBindings(const GRState* state, StoreManager::BindingsHandler& F) {
StoreMgr->iterBindings(state->getStore(), F);
}
-
-
- SVal GetSVal(const GRState* state, Loc LV, QualType T = QualType()) {
- return StoreMgr->Retrieve(state, LV, T);
- }
SVal GetSVal(const GRState* state, const MemRegion* R) {
return StoreMgr->Retrieve(state, loc::MemRegionVal(R));
}
inline SVal GRState::getSVal(const Stmt* Ex) const {
- return Mgr->GetSVal(this, Ex);
+ return getEnvironment().GetSVal(Ex, Mgr->ValueMgr);
}
inline SVal GRState::getBlkExprSVal(const Stmt* Ex) const {
return Mgr->GetBlkExprSVal(this, Ex);
}
-inline SVal GRState::getSValAsScalarOrLoc(const Stmt *Ex) const {
- return Mgr->GetSValAsScalarOrLoc(this, Ex);
+inline SVal GRState::getSValAsScalarOrLoc(const Stmt *S) const {
+ if (const Expr *Ex = dyn_cast<Expr>(S)) {
+ QualType T = Ex->getType();
+ if (Loc::IsLocType(T) || T->isIntegerType())
+ return getSVal(S);
+ }
+
+ return UnknownVal();
}
inline SVal GRState::getSVal(Loc LV, QualType T) const {
- return Mgr->GetSVal(this, LV, T);
+ return Mgr->StoreMgr->Retrieve(this, LV, T);
}
inline SVal GRState::getSVal(const MemRegion* R) const {