diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-10 02:17:20 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-10 02:17:20 +0000 |
commit | 479529e679957fbb92b56e116e3c86734429331e (patch) | |
tree | 592785451a7c6e5e8b968f6335454770039bf933 /lib | |
parent | 82d75b01f23b407e56836e305107c8008037ba35 (diff) |
Rename: StripCasts describes what it does better.
getBaseRegion will be used in another method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/BasicObjCFoundationChecks.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/BasicStore.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/MemRegion.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/SVals.cpp | 6 | ||||
-rw-r--r-- | lib/Analysis/Store.cpp | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp index 4781d5ec24..c2ecfa1f41 100644 --- a/lib/Analysis/BasicObjCFoundationChecks.cpp +++ b/lib/Analysis/BasicObjCFoundationChecks.cpp @@ -384,7 +384,7 @@ bool AuditCFNumberCreate::Audit(ExplodedNode* N,GRStateManager&){ if (!LV) return false; - const TypedRegion* R = dyn_cast<TypedRegion>(LV->getBaseRegion()); + const TypedRegion* R = dyn_cast<TypedRegion>(LV->StripCasts()); if (!R) return false; diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index 888af9bd57..7a36a3ee08 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -624,7 +624,7 @@ const GRState *BasicStoreManager::InvalidateRegion(const GRState *state, const Expr *E, unsigned Count, InvalidatedSymbols *IS) { - R = R->getBaseRegion(); + R = R->StripCasts(); if (!(isa<VarRegion>(R) || isa<ObjCIvarRegion>(R))) return state; diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 03614e8339..f63c43ec42 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -3050,7 +3050,7 @@ void CFRefCount::EvalObjCMessageExpr(ExplodedNodeSet& Dst, const LocationContext *LC = Pred->getLocationContext(); if (const ImplicitParamDecl *SelfDecl = LC->getSelfDecl()) { SVal SelfVal = St->getSVal(St->getRegion(SelfDecl, LC)); - if (L->getBaseRegion() == SelfVal.getAsRegion()) { + if (L->StripCasts() == SelfVal.getAsRegion()) { // Update the summary to make the default argument effect // 'StopTracking'. Summ = Summaries.copySummary(Summ); diff --git a/lib/Analysis/MemRegion.cpp b/lib/Analysis/MemRegion.cpp index 353e632402..ad3d36e79d 100644 --- a/lib/Analysis/MemRegion.cpp +++ b/lib/Analysis/MemRegion.cpp @@ -382,7 +382,7 @@ bool MemRegion::hasGlobalsOrParametersStorage() const { // View handling. //===----------------------------------------------------------------------===// -const MemRegion *MemRegion::getBaseRegion() const { +const MemRegion *MemRegion::StripCasts() const { const MemRegion *R = this; while (true) { if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) { diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 8106260f18..91769cd447 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -461,7 +461,7 @@ const GRState *RegionStoreManager::InvalidateRegion(const GRState *state, ASTContext& Ctx = StateMgr.getContext(); // Strip away casts. - R = R->getBaseRegion(); + R = R->StripCasts(); // Get the mapping of regions -> subregions. llvm::OwningPtr<RegionStoreSubRegionMap> diff --git a/lib/Analysis/SVals.cpp b/lib/Analysis/SVals.cpp index e230d274c5..d5d36e3b90 100644 --- a/lib/Analysis/SVals.cpp +++ b/lib/Analysis/SVals.cpp @@ -63,7 +63,7 @@ const FunctionDecl *SVal::getAsFunctionDecl() const { // FIXME: should we consider SymbolRef wrapped in CodeTextRegion? SymbolRef SVal::getAsLocSymbol() const { if (const loc::MemRegionVal *X = dyn_cast<loc::MemRegionVal>(this)) { - const MemRegion *R = X->getBaseRegion(); + const MemRegion *R = X->StripCasts(); if (const SymbolicRegion *SymR = dyn_cast<SymbolicRegion>(R)) return SymR->getSymbol(); } @@ -100,9 +100,9 @@ const MemRegion *SVal::getAsRegion() const { return 0; } -const MemRegion *loc::MemRegionVal::getBaseRegion() const { +const MemRegion *loc::MemRegionVal::StripCasts() const { const MemRegion *R = getRegion(); - return R ? R->getBaseRegion() : NULL; + return R ? R->StripCasts() : NULL; } bool SVal::symbol_iterator::operator==(const symbol_iterator &X) const { diff --git a/lib/Analysis/Store.cpp b/lib/Analysis/Store.cpp index 4b4ae65808..16af1be91e 100644 --- a/lib/Analysis/Store.cpp +++ b/lib/Analysis/Store.cpp @@ -43,7 +43,7 @@ const MemRegion *StoreManager::CastRegion(const MemRegion *R, QualType CastToTy) // Handle casts to Objective-C objects. if (CastToTy->isObjCObjectPointerType()) - return R->getBaseRegion(); + return R->StripCasts(); if (CastToTy->isBlockPointerType()) { // FIXME: We may need different solutions, depending on the symbol |