diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core')
-rw-r--r-- | lib/StaticAnalyzer/Core/BasicStore.cpp | 14 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/CFRefCount.cpp | 2 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/CXXExprEngine.cpp | 2 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/FlatStore.cpp | 4 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/GRState.cpp | 8 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/RegionStore.cpp | 20 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/SValBuilder.cpp | 4 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/Store.cpp | 2 |
8 files changed, 27 insertions, 29 deletions
diff --git a/lib/StaticAnalyzer/Core/BasicStore.cpp b/lib/StaticAnalyzer/Core/BasicStore.cpp index e082921b0e..105b505242 100644 --- a/lib/StaticAnalyzer/Core/BasicStore.cpp +++ b/lib/StaticAnalyzer/Core/BasicStore.cpp @@ -48,10 +48,10 @@ public: SVal Retrieve(Store store, Loc loc, QualType T = QualType()); - Store InvalidateRegion(Store store, const MemRegion *R, const Expr *E, + Store invalidateRegion(Store store, const MemRegion *R, const Expr *E, unsigned Count, InvalidatedSymbols *IS); - Store InvalidateRegions(Store store, const MemRegion * const *Begin, + Store invalidateRegions(Store store, const MemRegion * const *Begin, const MemRegion * const *End, const Expr *E, unsigned Count, InvalidatedSymbols *IS, bool invalidateGlobals, InvalidatedRegions *Regions); @@ -144,7 +144,7 @@ SVal BasicStoreManager::LazyRetrieve(Store store, const TypedRegion *R) { // Globals and parameters start with symbolic values. // Local variables initially are undefined. - // Non-static globals may have had their values reset by InvalidateRegions. + // Non-static globals may have had their values reset by invalidateRegions. const MemSpaceRegion *MS = VR->getMemorySpace(); if (isa<NonStaticGlobalSpaceRegion>(MS)) { BindingsTy B = GetBindings(store); @@ -523,7 +523,7 @@ StoreManager::BindingsHandler::~BindingsHandler() {} //===----------------------------------------------------------------------===// -Store BasicStoreManager::InvalidateRegions(Store store, +Store BasicStoreManager::invalidateRegions(Store store, const MemRegion * const *I, const MemRegion * const *End, const Expr *E, unsigned Count, @@ -535,7 +535,7 @@ Store BasicStoreManager::InvalidateRegions(Store store, for (BindingsTy::iterator I=B.begin(), End=B.end(); I != End; ++I) { const MemRegion *R = I.getKey(); if (isa<NonStaticGlobalSpaceRegion>(R->getMemorySpace())) - store = InvalidateRegion(store, R, E, Count, IS); + store = invalidateRegion(store, R, E, Count, IS); } } @@ -546,7 +546,7 @@ Store BasicStoreManager::InvalidateRegions(Store store, if (isa<NonStaticGlobalSpaceRegion>(R->getMemorySpace())) continue; } - store = InvalidateRegion(store, *I, E, Count, IS); + store = invalidateRegion(store, *I, E, Count, IS); if (Regions) Regions->push_back(R); } @@ -570,7 +570,7 @@ Store BasicStoreManager::InvalidateRegions(Store store, } -Store BasicStoreManager::InvalidateRegion(Store store, +Store BasicStoreManager::invalidateRegion(Store store, const MemRegion *R, const Expr *E, unsigned Count, diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp index fb43b345ae..09e69239d6 100644 --- a/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/lib/StaticAnalyzer/Core/CFRefCount.cpp @@ -2601,7 +2601,7 @@ void CFRefCount::evalSummary(ExplodedNodeSet& Dst, // NOTE: Even if RegionsToInvalidate is empty, we must still invalidate // global variables. - state = state->InvalidateRegions(RegionsToInvalidate.data(), + state = state->invalidateRegions(RegionsToInvalidate.data(), RegionsToInvalidate.data() + RegionsToInvalidate.size(), Ex, Count, &IS, diff --git a/lib/StaticAnalyzer/Core/CXXExprEngine.cpp b/lib/StaticAnalyzer/Core/CXXExprEngine.cpp index ece4f920d3..56dfe8cb04 100644 --- a/lib/StaticAnalyzer/Core/CXXExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/CXXExprEngine.cpp @@ -280,7 +280,7 @@ void ExprEngine::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred, const GRState *state = GetState(*I); if (ObjTy->isRecordType()) { - state = state->InvalidateRegion(EleReg, CNE, Count); + state = state->invalidateRegion(EleReg, CNE, Count); } else { if (CNE->hasInitializer()) { SVal V = state->getSVal(*CNE->constructor_arg_begin()); diff --git a/lib/StaticAnalyzer/Core/FlatStore.cpp b/lib/StaticAnalyzer/Core/FlatStore.cpp index d8bdc55e74..c3da72af5a 100644 --- a/lib/StaticAnalyzer/Core/FlatStore.cpp +++ b/lib/StaticAnalyzer/Core/FlatStore.cpp @@ -57,7 +57,7 @@ public: typedef llvm::DenseSet<SymbolRef> InvalidatedSymbols; - Store InvalidateRegions(Store store, const MemRegion * const *I, + Store invalidateRegions(Store store, const MemRegion * const *I, const MemRegion * const *E, const Expr *Ex, unsigned Count, InvalidatedSymbols *IS, bool invalidateGlobals, InvalidatedRegions *Regions); @@ -157,7 +157,7 @@ Store FlatStoreManager::BindDeclWithNoInit(Store store, const VarRegion *VR) { return store; } -Store FlatStoreManager::InvalidateRegions(Store store, +Store FlatStoreManager::invalidateRegions(Store store, const MemRegion * const *I, const MemRegion * const *E, const Expr *Ex, unsigned Count, diff --git a/lib/StaticAnalyzer/Core/GRState.cpp b/lib/StaticAnalyzer/Core/GRState.cpp index 0278a0d385..80f2ae082b 100644 --- a/lib/StaticAnalyzer/Core/GRState.cpp +++ b/lib/StaticAnalyzer/Core/GRState.cpp @@ -110,7 +110,7 @@ const GRState *GRState::bindDefault(SVal loc, SVal V) const { new_state; } -const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin, +const GRState *GRState::invalidateRegions(const MemRegion * const *Begin, const MemRegion * const *End, const Expr *E, unsigned Count, StoreManager::InvalidatedSymbols *IS, @@ -121,7 +121,7 @@ const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin, if (Eng && Eng->wantsRegionChangeUpdate(this)) { StoreManager::InvalidatedRegions Regions; - Store new_store = Mgr.StoreMgr->InvalidateRegions(St, Begin, End, + Store new_store = Mgr.StoreMgr->invalidateRegions(St, Begin, End, E, Count, IS, invalidateGlobals, &Regions); @@ -132,7 +132,7 @@ const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin, &Regions.back()+1); } - Store new_store = Mgr.StoreMgr->InvalidateRegions(St, Begin, End, + Store new_store = Mgr.StoreMgr->invalidateRegions(St, Begin, End, E, Count, IS, invalidateGlobals, NULL); @@ -140,7 +140,7 @@ const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin, } const GRState *GRState::unbindLoc(Loc LV) const { - assert(!isa<loc::MemRegionVal>(LV) && "Use InvalidateRegion instead."); + assert(!isa<loc::MemRegionVal>(LV) && "Use invalidateRegion instead."); Store OldStore = getStore(); Store NewStore = getStateManager().StoreMgr->Remove(OldStore, LV); diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index ab93ccb41d..c5d21e8b22 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -228,8 +228,6 @@ public: /// For DerivedToBase casts, create a CXXBaseObjectRegion and return it. virtual SVal evalDerivedToBase(SVal derived, QualType basePtrType); - SVal evalBinOp(BinaryOperator::Opcode Op,Loc L, NonLoc R, QualType resultTy); - Store getInitialStore(const LocationContext *InitLoc) { return RBFactory.getEmptyMap().getRoot(); } @@ -238,7 +236,7 @@ public: // Binding values to regions. //===-------------------------------------------------------------------===// - Store InvalidateRegions(Store store, + Store invalidateRegions(Store store, const MemRegion * const *Begin, const MemRegion * const *End, const Expr *E, unsigned Count, @@ -570,21 +568,21 @@ void RegionStoreManager::RemoveSubRegionBindings(RegionBindings &B, } namespace { -class InvalidateRegionsWorker : public ClusterAnalysis<InvalidateRegionsWorker> +class invalidateRegionsWorker : public ClusterAnalysis<invalidateRegionsWorker> { const Expr *Ex; unsigned Count; StoreManager::InvalidatedSymbols *IS; StoreManager::InvalidatedRegions *Regions; public: - InvalidateRegionsWorker(RegionStoreManager &rm, + invalidateRegionsWorker(RegionStoreManager &rm, GRStateManager &stateMgr, RegionBindings b, const Expr *ex, unsigned count, StoreManager::InvalidatedSymbols *is, StoreManager::InvalidatedRegions *r, bool includeGlobals) - : ClusterAnalysis<InvalidateRegionsWorker>(rm, stateMgr, b, includeGlobals), + : ClusterAnalysis<invalidateRegionsWorker>(rm, stateMgr, b, includeGlobals), Ex(ex), Count(count), IS(is), Regions(r) {} void VisitCluster(const MemRegion *baseR, BindingKey *I, BindingKey *E); @@ -595,7 +593,7 @@ private: }; } -void InvalidateRegionsWorker::VisitBinding(SVal V) { +void invalidateRegionsWorker::VisitBinding(SVal V) { // A symbol? Mark it touched by the invalidation. if (IS) if (SymbolRef Sym = V.getAsSymbol()) @@ -623,7 +621,7 @@ void InvalidateRegionsWorker::VisitBinding(SVal V) { } } -void InvalidateRegionsWorker::VisitCluster(const MemRegion *baseR, +void invalidateRegionsWorker::VisitCluster(const MemRegion *baseR, BindingKey *I, BindingKey *E) { for ( ; I != E; ++I) { // Get the old binding. Is it a region? If so, add it to the worklist. @@ -635,7 +633,7 @@ void InvalidateRegionsWorker::VisitCluster(const MemRegion *baseR, } } -void InvalidateRegionsWorker::VisitBaseRegion(const MemRegion *baseR) { +void invalidateRegionsWorker::VisitBaseRegion(const MemRegion *baseR) { if (IS) { // Symbolic region? Mark that symbol touched by the invalidation. if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(baseR)) @@ -708,14 +706,14 @@ void InvalidateRegionsWorker::VisitBaseRegion(const MemRegion *baseR) { B = RM.addBinding(B, baseR, BindingKey::Direct, V); } -Store RegionStoreManager::InvalidateRegions(Store store, +Store RegionStoreManager::invalidateRegions(Store store, const MemRegion * const *I, const MemRegion * const *E, const Expr *Ex, unsigned Count, InvalidatedSymbols *IS, bool invalidateGlobals, InvalidatedRegions *Regions) { - InvalidateRegionsWorker W(*this, StateMgr, + invalidateRegionsWorker W(*this, StateMgr, RegionStoreManager::GetRegionBindings(store), Ex, Count, IS, Regions, invalidateGlobals); diff --git a/lib/StaticAnalyzer/Core/SValBuilder.cpp b/lib/StaticAnalyzer/Core/SValBuilder.cpp index b3a8a5c93b..b2ffcbda71 100644 --- a/lib/StaticAnalyzer/Core/SValBuilder.cpp +++ b/lib/StaticAnalyzer/Core/SValBuilder.cpp @@ -224,7 +224,7 @@ SVal SValBuilder::evalCast(SVal val, QualType castTy, QualType originalTy) { if (nonloc::LocAsInteger *LV = dyn_cast<nonloc::LocAsInteger>(&val)) { if (const MemRegion *R = LV->getLoc().getAsRegion()) { StoreManager &storeMgr = StateMgr.getStoreManager(); - R = storeMgr.CastRegion(R, castTy); + R = storeMgr.castRegion(R, castTy); return R ? SVal(loc::MemRegionVal(R)) : UnknownVal(); } return LV->getLoc(); @@ -299,7 +299,7 @@ SVal SValBuilder::evalCast(SVal val, QualType castTy, QualType originalTy) { // Delegate to store manager to get the result of casting a region to a // different type. If the MemRegion* returned is NULL, this expression // Evaluates to UnknownVal. - R = storeMgr.CastRegion(R, castTy); + R = storeMgr.castRegion(R, castTy); return R ? SVal(loc::MemRegionVal(R)) : UnknownVal(); } diff --git a/lib/StaticAnalyzer/Core/Store.cpp b/lib/StaticAnalyzer/Core/Store.cpp index 3f5863e5c4..28f890b39c 100644 --- a/lib/StaticAnalyzer/Core/Store.cpp +++ b/lib/StaticAnalyzer/Core/Store.cpp @@ -51,7 +51,7 @@ const ElementRegion *StoreManager::GetElementZeroRegion(const MemRegion *R, return MRMgr.getElementRegion(T, idx, R, Ctx); } -const MemRegion *StoreManager::CastRegion(const MemRegion *R, QualType CastToTy) { +const MemRegion *StoreManager::castRegion(const MemRegion *R, QualType CastToTy) { ASTContext& Ctx = StateMgr.getContext(); |