Remove a special case for OSAtomic functions. We can already bind and retrieve
with the same binding key. The only trick here is that sometimes the Symbolic
region is stored in with an LocAsInteger wrapper. We unwrap that in
SVal::getAsLocSymbol().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111734 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp
index 9734493..4afa96a 100644
--- a/lib/Checker/RegionStore.cpp
+++ b/lib/Checker/RegionStore.cpp
@@ -1326,14 +1326,8 @@
if (const TypedRegion *superR =
dyn_cast<TypedRegion>(ER->getSuperRegion())) {
QualType superTy = superR->getValueType();
- QualType erTy = ER->getValueType();
-
- if (IsAnyPointerOrIntptr(superTy, Ctx) &&
- IsAnyPointerOrIntptr(erTy, Ctx)) {
- V = ValMgr.getSValuator().EvalCast(V, superTy, erTy);
- return Bind(store, loc::MemRegionVal(superR), V);
- }
// For now, just invalidate the fields of the struct/union/class.
+ // This is for test: undef-buffers.c
// FIXME: Precisely handle the fields of the record.
if (superTy->isStructureOrClassType())
return KillStruct(store, superR, UnknownVal());