diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-29 18:17:40 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-29 18:17:40 +0000 |
commit | 5e77ebae47099d76020e84e604b33bb33c9006c3 (patch) | |
tree | d01a640da049339539f02d1869fb4e974c324a71 /lib/Analysis/BasicObjCFoundationChecks.cpp | |
parent | 1004a9f2b9eaf885e55ad8656194ef2a341db0f5 (diff) |
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
Diffstat (limited to 'lib/Analysis/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | lib/Analysis/BasicObjCFoundationChecks.cpp | 13 |
1 files changed, 5 insertions, 8 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? |