[cfe-commits] r125395 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h include/clang/StaticAnalyzer/Core/PathSensitive/Store.h lib/StaticAnalyzer/Checkers/CStringChecker.cpp lib/StaticAnalyzer/Core/BasicStore.cpp lib/StaticAnalyzer/Core/CFRefCount.cpp lib/StaticAnalyzer/Core/CXXExprEngine.cpp lib/StaticAnalyzer/Core/FlatStore.cpp lib/StaticAnalyzer/Core/GRState.cpp lib/StaticAnalyzer/Core/RegionStore.cpp lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/Store.cpp
Ted Kremenek
kremenek at apple.com
Fri Feb 11 11:48:15 PST 2011
Author: kremenek
Date: Fri Feb 11 13:48:15 2011
New Revision: 125395
URL: http://llvm.org/viewvc/llvm-project?rev=125395&view=rev
Log:
Rename 'InvalidateRegions()' to 'invalidateRegions()'.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Core/BasicStore.cpp
cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp
cfe/trunk/lib/StaticAnalyzer/Core/CXXExprEngine.cpp
cfe/trunk/lib/StaticAnalyzer/Core/FlatStore.cpp
cfe/trunk/lib/StaticAnalyzer/Core/GRState.cpp
cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp
cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h Fri Feb 11 13:48:15 2011
@@ -226,19 +226,19 @@
const GRState *unbindLoc(Loc LV) const;
- /// InvalidateRegion - Returns the state with bindings for the given region
- /// cleared from the store. See InvalidateRegions.
- const GRState *InvalidateRegion(const MemRegion *R,
+ /// invalidateRegion - Returns the state with bindings for the given region
+ /// cleared from the store. See invalidateRegions.
+ const GRState *invalidateRegion(const MemRegion *R,
const Expr *E, unsigned BlockCount,
StoreManager::InvalidatedSymbols *IS = NULL)
const {
- return InvalidateRegions(&R, &R+1, E, BlockCount, IS, false);
+ return invalidateRegions(&R, &R+1, E, BlockCount, IS, false);
}
- /// InvalidateRegions - Returns the state with bindings for the given regions
+ /// invalidateRegions - Returns the state with bindings for the given regions
/// cleared from the store. The regions are provided as a continuous array
/// from Begin to End. Optionally invalidates global regions as well.
- const GRState *InvalidateRegions(const MemRegion * const *Begin,
+ const GRState *invalidateRegions(const MemRegion * const *Begin,
const MemRegion * const *End,
const Expr *E, unsigned BlockCount,
StoreManager::InvalidatedSymbols *IS,
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h Fri Feb 11 13:48:15 2011
@@ -148,10 +148,10 @@
const ElementRegion *GetElementZeroRegion(const MemRegion *R, QualType T);
- /// CastRegion - Used by ExprEngine::VisitCast to handle casts from
+ /// castRegion - Used by ExprEngine::VisitCast to handle casts from
/// a MemRegion* to a specific location type. 'R' is the region being
/// casted and 'CastToTy' the result type of the cast.
- const MemRegion *CastRegion(const MemRegion *region, QualType CastToTy);
+ const MemRegion *castRegion(const MemRegion *region, QualType CastToTy);
virtual Store removeDeadBindings(Store store, const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
@@ -164,7 +164,7 @@
typedef llvm::DenseSet<SymbolRef> InvalidatedSymbols;
typedef llvm::SmallVector<const MemRegion *, 8> InvalidatedRegions;
- /// InvalidateRegions - Clears out the specified regions from the store,
+ /// invalidateRegions - Clears out the specified regions from the store,
/// marking their values as unknown. Depending on the store, this may also
/// invalidate additional regions that may have changed based on accessing
/// the given regions. Optionally, invalidates non-static globals as well.
@@ -183,7 +183,7 @@
/// invalidated. This should include any regions explicitly invalidated
/// even if they do not currently have bindings. Pass \c NULL if this
/// information will not be used.
- virtual Store InvalidateRegions(Store store,
+ virtual Store invalidateRegions(Store store,
const MemRegion * const *Begin,
const MemRegion * const *End,
const Expr *E, unsigned Count,
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp Fri Feb 11 13:48:15 2011
@@ -593,7 +593,7 @@
// Invalidate this region.
unsigned Count = C.getNodeBuilder().getCurrentBlockCount();
- return state->InvalidateRegion(R, E, Count, NULL);
+ return state->invalidateRegion(R, E, Count, NULL);
}
// If we have a non-region value by chance, just remove the binding.
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BasicStore.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BasicStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BasicStore.cpp Fri Feb 11 13:48:15 2011
@@ -48,10 +48,10 @@
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 @@
// 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 @@
//===----------------------------------------------------------------------===//
-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 @@
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 @@
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::InvalidateRegion(Store store,
+Store BasicStoreManager::invalidateRegion(Store store,
const MemRegion *R,
const Expr *E,
unsigned Count,
Modified: cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp Fri Feb 11 13:48:15 2011
@@ -2601,7 +2601,7 @@
// 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,
Modified: cfe/trunk/lib/StaticAnalyzer/Core/CXXExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CXXExprEngine.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CXXExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CXXExprEngine.cpp Fri Feb 11 13:48:15 2011
@@ -280,7 +280,7 @@
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());
Modified: cfe/trunk/lib/StaticAnalyzer/Core/FlatStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/FlatStore.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/FlatStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/FlatStore.cpp Fri Feb 11 13:48:15 2011
@@ -57,7 +57,7 @@
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 @@
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,
Modified: cfe/trunk/lib/StaticAnalyzer/Core/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/GRState.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/GRState.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/GRState.cpp Fri Feb 11 13:48:15 2011
@@ -110,7 +110,7 @@
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 @@
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 @@
&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::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);
Modified: cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp Fri Feb 11 13:48:15 2011
@@ -228,8 +228,6 @@
/// 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 @@
// 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 @@
}
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 @@
};
}
-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::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::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 @@
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);
Modified: cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp Fri Feb 11 13:48:15 2011
@@ -224,7 +224,7 @@
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 @@
// 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();
}
Modified: cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp?rev=125395&r1=125394&r2=125395&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp Fri Feb 11 13:48:15 2011
@@ -51,7 +51,7 @@
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();
More information about the cfe-commits
mailing list