diff options
Diffstat (limited to 'lib/Checker/Store.cpp')
-rw-r--r-- | lib/Checker/Store.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Checker/Store.cpp b/lib/Checker/Store.cpp index 1cb5cd70ca..aaa518edc8 100644 --- a/lib/Checker/Store.cpp +++ b/lib/Checker/Store.cpp @@ -28,7 +28,7 @@ Store StoreManager::EnterStackFrame(const GRState *state, const MemRegion *StoreManager::MakeElementRegion(const MemRegion *Base, QualType EleTy, uint64_t index) { - SVal idx = ValMgr.makeArrayIndex(index); + NonLoc idx = ValMgr.makeArrayIndex(index); return MRMgr.getElementRegion(EleTy, idx, Base, ValMgr.getContext()); } @@ -45,7 +45,7 @@ static bool IsCompleteType(ASTContext &Ctx, QualType Ty) { const ElementRegion *StoreManager::GetElementZeroRegion(const MemRegion *R, QualType T) { - SVal idx = ValMgr.makeZeroArrayIndex(); + NonLoc idx = ValMgr.makeZeroArrayIndex(); assert(!T.isNull()); return MRMgr.getElementRegion(T, idx, R, Ctx); } @@ -267,7 +267,7 @@ SVal StoreManager::getLValueFieldOrIvar(const Decl* D, SVal Base) { return loc::MemRegionVal(MRMgr.getFieldRegion(cast<FieldDecl>(D), BaseR)); } -SVal StoreManager::getLValueElement(QualType elementType, SVal Offset, +SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, SVal Base) { // If the base is an unknown or undefined value, just return it back. @@ -283,7 +283,7 @@ SVal StoreManager::getLValueElement(QualType elementType, SVal Offset, const ElementRegion *ElemR = dyn_cast<ElementRegion>(BaseRegion); // Convert the offset to the appropriate size and signedness. - Offset = ValMgr.convertToArrayIndex(Offset); + Offset = cast<NonLoc>(ValMgr.convertToArrayIndex(Offset)); if (!ElemR) { // @@ -322,8 +322,8 @@ SVal StoreManager::getLValueElement(QualType elementType, SVal Offset, assert(BaseIdxI.isSigned()); // Compute the new index. - SVal NewIdx = nonloc::ConcreteInt( - ValMgr.getBasicValueFactory().getValue(BaseIdxI + OffI)); + nonloc::ConcreteInt NewIdx(ValMgr.getBasicValueFactory().getValue(BaseIdxI + + OffI)); // Construct the new ElementRegion. const MemRegion *ArrayR = ElemR->getSuperRegion(); |