aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/BasicObjCFoundationChecks.cpp13
-rw-r--r--lib/Analysis/CFRefCount.cpp2
2 files changed, 6 insertions, 9 deletions
diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp
index 7620377987..684c88c998 100644
--- a/lib/Analysis/BasicObjCFoundationChecks.cpp
+++ b/lib/Analysis/BasicObjCFoundationChecks.cpp
@@ -394,14 +394,11 @@ bool AuditCFNumberCreate::Audit(ExplodedNode<GRState>* N,GRStateManager&){
if (!LV)
return false;
- const TypedRegion* R = dyn_cast<TypedRegion>(LV->getRegion());
- if (!R) return false;
-
- while (const TypedViewRegion* ATR = dyn_cast<TypedViewRegion>(R)) {
- R = dyn_cast<TypedRegion>(ATR->getSuperRegion());
- if (!R) return false;
- }
-
+ const TypedRegion* R = dyn_cast<TypedRegion>(LV->getBaseRegion());
+
+ if (!R)
+ return false;
+
QualType T = Ctx.getCanonicalType(R->getValueType(Ctx));
// FIXME: If the pointee isn't an integer type, should we flag a warning?
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 04f9cb82a2..78d1a8b3e5 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -3023,7 +3023,7 @@ void CFRefCount::EvalObjCMessageExpr(ExplodedNodeSet<GRState>& Dst,
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);