Remove some uses of TypedViewRegion, and use getBaseRegion() in a context where
we don't care about ElementRegions layered on top of a base region.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77484 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 04f9cb8..78d1a8b 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -3023,7 +3023,7 @@
if (Expr* Receiver = ME->getReceiver()) {
SVal X = St->getSValAsScalarOrLoc(Receiver);
if (loc::MemRegionVal* L = dyn_cast<loc::MemRegionVal>(&X))
- if (L->getRegion() == St->getSelfRegion()) {
+ if (L->getBaseRegion() == St->getSelfRegion()) {
// Update the summary to make the default argument effect
// 'StopTracking'.
Summ = Summaries.copySummary(Summ);