diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-04 02:39:47 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-04 02:39:47 +0000 |
commit | c999ed792900026c462027e546d63c3f39310755 (patch) | |
tree | a62d860c4b8600ca704e0cba267003fa824cf75e /lib/Checker/BasicStore.cpp | |
parent | a3218e7399a99ec7f64c2efc027d9f61eaeb0ad4 (diff) |
Now that CastRetrievedVal returns SVal, there is no need to use CastResult.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/BasicStore.cpp')
-rw-r--r-- | lib/Checker/BasicStore.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/Checker/BasicStore.cpp b/lib/Checker/BasicStore.cpp index 0c95940e03..5de9573805 100644 --- a/lib/Checker/BasicStore.cpp +++ b/lib/Checker/BasicStore.cpp @@ -44,8 +44,7 @@ public: return new BasicStoreSubRegionMap(); } - SValuator::CastResult Retrieve(const GRState *state, Loc loc, - QualType T = QualType()); + SVal Retrieve(const GRState *state, Loc loc, QualType T = QualType()); const GRState *InvalidateRegion(const GRState *state, const MemRegion *R, const Expr *E, unsigned Count, @@ -250,11 +249,9 @@ static bool isHigherOrderRawPtr(QualType T, ASTContext &C) { } } -SValuator::CastResult BasicStoreManager::Retrieve(const GRState *state, - Loc loc, QualType T) { - +SVal BasicStoreManager::Retrieve(const GRState *state, Loc loc, QualType T) { if (isa<UnknownVal>(loc)) - return SValuator::CastResult(state, UnknownVal()); + return UnknownVal(); assert(!isa<UndefinedVal>(loc)); @@ -264,7 +261,7 @@ SValuator::CastResult BasicStoreManager::Retrieve(const GRState *state, const MemRegion* R = cast<loc::MemRegionVal>(loc).getRegion(); if (!(isa<VarRegion>(R) || isa<ObjCIvarRegion>(R))) - return SValuator::CastResult(state, UnknownVal()); + return UnknownVal(); BindingsTy B = GetBindings(state->getStore()); BindingsTy::data_type *Val = B.lookup(R); @@ -272,22 +269,21 @@ SValuator::CastResult BasicStoreManager::Retrieve(const GRState *state, if (!Val) break; - return SValuator::CastResult(state, - CastRetrievedVal(*Val, cast<TypedRegion>(R), T)); + return CastRetrievedVal(*Val, cast<TypedRegion>(R), T); } case loc::ConcreteIntKind: // Some clients may call GetSVal with such an option simply because // they are doing a quick scan through their Locs (potentially to // invalidate their bindings). Just return Undefined. - return SValuator::CastResult(state, UndefinedVal()); + return UndefinedVal(); default: assert (false && "Invalid Loc."); break; } - return SValuator::CastResult(state, UnknownVal()); + return UnknownVal(); } Store BasicStoreManager::BindInternal(Store store, Loc loc, SVal V) { @@ -398,7 +394,7 @@ BasicStoreManager::RemoveDeadBindings(GRState &state, Stmt* Loc, break; Marked.insert(MR); - SVal X = Retrieve(&state, loc::MemRegionVal(MR)).getSVal(); + SVal X = Retrieve(&state, loc::MemRegionVal(MR)); // FIXME: We need to handle symbols nested in region definitions. for (symbol_iterator SI=X.symbol_begin(),SE=X.symbol_end();SI!=SE;++SI) |