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 | 87a7a451ad726d765c1e1fb4881a996e453802fe (patch) | |
tree | 21d67c9507995cfd4830277c88f9c4b47b82a587 /clang/lib/Analysis/BasicObjCFoundationChecks.cpp | |
parent | bca70671e79664dd2ecebbd92021a8e9396a3809 (diff) | |
download | bcm5719-llvm-87a7a451ad726d765c1e1fb4881a996e453802fe.tar.gz bcm5719-llvm-87a7a451ad726d765c1e1fb4881a996e453802fe.zip |
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.
llvm-svn: 77484
Diffstat (limited to 'clang/lib/Analysis/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | clang/lib/Analysis/BasicObjCFoundationChecks.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/Analysis/BasicObjCFoundationChecks.cpp b/clang/lib/Analysis/BasicObjCFoundationChecks.cpp index 76203779875..684c88c9987 100644 --- a/clang/lib/Analysis/BasicObjCFoundationChecks.cpp +++ b/clang/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? |