aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 543783d924..c47aaa20e0 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -882,6 +882,9 @@ RegionStoreManager::Retrieve(const GRState *state, Loc L, QualType T) {
MR = MRMgr.getElementRegion(T, idx, MR, Ctx);
}
+ if (isa<CodeTextRegion>(MR))
+ return SValuator::CastResult(state, UnknownVal());
+
// FIXME: Perhaps this method should just take a 'const MemRegion*' argument
// instead of 'Loc', and have the other Loc cases handled at a higher level.
const TypedRegion *R = cast<TypedRegion>(MR);
@@ -1000,7 +1003,6 @@ SVal RegionStoreManager::RetrieveElement(const GRState* state,
if (R->getIndex().isZeroConstant()) {
if (const TypedRegion *superTR = dyn_cast<TypedRegion>(superR)) {
ASTContext &Ctx = getContext();
-
if (IsAnyPointerOrIntptr(superTR->getValueType(Ctx), Ctx)) {
QualType valTy = R->getValueType(Ctx);
if (IsAnyPointerOrIntptr(valTy, Ctx)) {