MemRegion can refer to ASTContext without external help.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110784 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/BasicStore.cpp b/lib/Checker/BasicStore.cpp
index db2e3ed..7d01c9e 100644
--- a/lib/Checker/BasicStore.cpp
+++ b/lib/Checker/BasicStore.cpp
@@ -236,7 +236,7 @@
if (isa<Loc>(V) || isa<nonloc::LocAsInteger>(V))
if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) {
// FIXME: Should check for index 0.
- QualType T = ER->getLocationType(C);
+ QualType T = ER->getLocationType();
if (isHigherOrderRawPtr(T, C))
R = ER->getSuperRegion();
@@ -249,7 +249,7 @@
// Do not bind to arrays. We need to explicitly check for this so that
// we do not encounter any weirdness of trying to load/store from arrays.
- if (TyR->isBoundable() && TyR->getValueType(C)->isArrayType())
+ if (TyR->isBoundable() && TyR->getValueType()->isArrayType())
return store;
if (nonloc::LocAsInteger *X = dyn_cast<nonloc::LocAsInteger>(&V)) {
@@ -259,7 +259,7 @@
// a pointer. We may wish to flag a type error here if the types
// are incompatible. This may also cause lots of breakage
// elsewhere. Food for thought.
- if (TyR->isBoundable() && Loc::IsLocType(TyR->getValueType(C)))
+ if (TyR->isBoundable() && Loc::IsLocType(TyR->getValueType()))
V = X->getLoc();
}
@@ -580,7 +580,7 @@
}
}
- QualType T = cast<TypedRegion>(R)->getValueType(R->getContext());
+ QualType T = cast<TypedRegion>(R)->getValueType();
SVal V = ValMgr.getConjuredSymbolVal(R, E, T, Count);
return Bind(store, loc::MemRegionVal(R), V);
}