aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-11 22:55:17 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-11 22:55:17 +0000
commit109bf47503a7c20e1ff98a7b112024e3ff75a49e (patch)
treec7debc4420bbaa54afc69ae91166394baac8c56a /lib/Analysis/CFRefCount.cpp
parent482c682256f7893381c13e770f21ba9a260a5736 (diff)
When stripping element regions for invalidating region values, treat FieldRegions and ObjCIvarRegions as "base" regions in addition to VarRegions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71488 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 29a28c1a19..bc140077dc 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -2673,10 +2673,13 @@ void CFRefCount::EvalSummary(ExplodedNodeSet<GRState>& Dst,
// approriately delegated to the respective StoreManagers while
// still allowing us to do checker-specific logic (e.g.,
// invalidating reference counts), probably via callbacks.
- if (ER->getElementType()->isIntegralType())
- if (const VarRegion *superReg =
- dyn_cast<VarRegion>(ER->getSuperRegion()))
- R = superReg;
+ if (ER->getElementType()->isIntegralType()) {
+ const MemRegion *superReg = ER->getSuperRegion();
+ if (isa<VarRegion>(superReg) || isa<FieldRegion>(superReg) ||
+ isa<ObjCIvarRegion>(superReg))
+ R = cast<TypedRegion>(superReg);
+ }
+
// FIXME: What about layers of ElementRegions?
}