aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BasicStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r--lib/Analysis/BasicStore.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index 56cf799943..d96ef5b948 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -216,16 +216,11 @@ SVal BasicStoreManager::getLValueElement(const GRState *state,
return Base;
}
-
- if (const TypedRegion *TR = dyn_cast<TypedRegion>(R)) {
- BaseR = TR;
+ if (isa<TypedRegion>(R) || isa<SymbolicRegion>(R)) {
+ BaseR = R;
break;
}
- if (const SymbolicRegion* SR = dyn_cast<SymbolicRegion>(R)) {
- BaseR = SR;
- }
-
break;
}
@@ -241,9 +236,10 @@ SVal BasicStoreManager::getLValueElement(const GRState *state,
return Base;
}
- if (BaseR)
+ if (BaseR) {
return ValMgr.makeLoc(MRMgr.getElementRegion(elementType, UnknownVal(),
BaseR, getContext()));
+ }
else
return UnknownVal();
}