[cfe-commits] r123460 - in /cfe/trunk: include/clang/StaticAnalyzer/PathSensitive/ lib/StaticAnalyzer/ lib/StaticAnalyzer/Checkers/
Ted Kremenek
kremenek at apple.com
Fri Jan 14 12:34:15 PST 2011
Author: kremenek
Date: Fri Jan 14 14:34:15 2011
New Revision: 123460
URL: http://llvm.org/viewvc/llvm-project?rev=123460&view=rev
Log:
Rename 'RemoveDeadBindings()' to 'removeDeadBindings()'
Modified:
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ConstraintManager.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Environment.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/GRState.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Store.h
cfe/trunk/lib/StaticAnalyzer/BasicConstraintManager.cpp
cfe/trunk/lib/StaticAnalyzer/BasicStore.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
cfe/trunk/lib/StaticAnalyzer/Environment.cpp
cfe/trunk/lib/StaticAnalyzer/FlatStore.cpp
cfe/trunk/lib/StaticAnalyzer/GRState.cpp
cfe/trunk/lib/StaticAnalyzer/RangeConstraintManager.cpp
cfe/trunk/lib/StaticAnalyzer/RegionStore.cpp
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ConstraintManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ConstraintManager.h?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ConstraintManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ConstraintManager.h Fri Jan 14 14:34:15 2011
@@ -48,7 +48,7 @@
virtual bool isEqual(const GRState *state, SymbolRef sym,
const llvm::APSInt& V) const = 0;
- virtual const GRState *RemoveDeadBindings(const GRState *state,
+ virtual const GRState *removeDeadBindings(const GRState *state,
SymbolReaper& SymReaper) = 0;
virtual void print(const GRState *state, llvm::raw_ostream& Out,
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Environment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Environment.h?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Environment.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Environment.h Fri Jan 14 14:34:15 2011
@@ -94,7 +94,7 @@
Environment bindExprAndLocation(Environment Env, const Stmt *S, SVal location,
SVal V);
- Environment RemoveDeadBindings(Environment Env,
+ Environment removeDeadBindings(Environment Env,
SymbolReaper &SymReaper, const GRState *ST,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots);
};
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/GRState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/GRState.h?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/GRState.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/GRState.h Fri Jan 14 14:34:15 2011
@@ -484,7 +484,7 @@
ConstraintManager& getConstraintManager() { return *ConstraintMgr; }
SubEngine& getOwningEngine() { return Eng; }
- const GRState* RemoveDeadBindings(const GRState* St,
+ const GRState* removeDeadBindings(const GRState* St,
const StackFrameContext *LCtx,
SymbolReaper& SymReaper);
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Store.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Store.h?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Store.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Store.h Fri Jan 14 14:34:15 2011
@@ -153,7 +153,7 @@
/// casted and 'CastToTy' the result type of the cast.
const MemRegion *CastRegion(const MemRegion *region, QualType CastToTy);
- virtual Store RemoveDeadBindings(Store store, const StackFrameContext *LCtx,
+ virtual Store removeDeadBindings(Store store, const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots) = 0;
Modified: cfe/trunk/lib/StaticAnalyzer/BasicConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/BasicConstraintManager.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/BasicConstraintManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/BasicConstraintManager.cpp Fri Jan 14 14:34:15 2011
@@ -90,7 +90,7 @@
bool isEqual(const GRState* state, SymbolRef sym, const llvm::APSInt& V)
const;
- const GRState* RemoveDeadBindings(const GRState* state, SymbolReaper& SymReaper);
+ const GRState* removeDeadBindings(const GRState* state, SymbolReaper& SymReaper);
void print(const GRState* state, llvm::raw_ostream& Out,
const char* nl, const char *sep);
@@ -276,7 +276,7 @@
/// Scan all symbols referenced by the constraints. If the symbol is not alive
/// as marked in LSymbols, mark it as dead in DSymbols.
const GRState*
-BasicConstraintManager::RemoveDeadBindings(const GRState* state,
+BasicConstraintManager::removeDeadBindings(const GRState* state,
SymbolReaper& SymReaper) {
ConstEqTy CE = state->get<ConstEq>();
Modified: cfe/trunk/lib/StaticAnalyzer/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/BasicStore.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/BasicStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/BasicStore.cpp Fri Jan 14 14:34:15 2011
@@ -72,9 +72,9 @@
/// conversions between arrays and pointers.
SVal ArrayToPointer(Loc Array) { return Array; }
- /// RemoveDeadBindings - Scans a BasicStore of 'state' for dead values.
+ /// removeDeadBindings - Scans a BasicStore of 'state' for dead values.
/// It updatees the GRState object in place with the values removed.
- Store RemoveDeadBindings(Store store, const StackFrameContext *LCtx,
+ Store removeDeadBindings(Store store, const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots);
@@ -278,7 +278,7 @@
}
}
-Store BasicStoreManager::RemoveDeadBindings(Store store,
+Store BasicStoreManager::removeDeadBindings(Store store,
const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots)
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp Fri Jan 14 14:34:15 2011
@@ -557,7 +557,7 @@
}
const StackFrameContext *SFC = LC->getCurrentStackFrame();
- CleanedState = StateMgr.RemoveDeadBindings(St, SFC, SymReaper);
+ CleanedState = StateMgr.removeDeadBindings(St, SFC, SymReaper);
} else {
CleanedState = EntryNode->getState();
}
Modified: cfe/trunk/lib/StaticAnalyzer/Environment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Environment.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Environment.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Environment.cpp Fri Jan 14 14:34:15 2011
@@ -140,7 +140,7 @@
return (bool) (((uintptr_t) S) & 0x1);
}
-// RemoveDeadBindings:
+// removeDeadBindings:
// - Remove subexpression bindings.
// - Remove dead block expression bindings.
// - Keep live block expression bindings:
@@ -148,7 +148,7 @@
// see ScanReachableSymbols.
// - Mark the region in DRoots if the binding is a loc::MemRegionVal.
Environment
-EnvironmentManager::RemoveDeadBindings(Environment Env,
+EnvironmentManager::removeDeadBindings(Environment Env,
SymbolReaper &SymReaper,
const GRState *ST,
llvm::SmallVectorImpl<const MemRegion*> &DRoots) {
Modified: cfe/trunk/lib/StaticAnalyzer/FlatStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/FlatStore.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/FlatStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/FlatStore.cpp Fri Jan 14 14:34:15 2011
@@ -45,7 +45,7 @@
}
SVal ArrayToPointer(Loc Array);
- Store RemoveDeadBindings(Store store, const StackFrameContext *LCtx,
+ Store removeDeadBindings(Store store, const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots){
return store;
Modified: cfe/trunk/lib/StaticAnalyzer/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/GRState.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/GRState.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/GRState.cpp Fri Jan 14 14:34:15 2011
@@ -36,7 +36,7 @@
}
const GRState*
-GRStateManager::RemoveDeadBindings(const GRState* state,
+GRStateManager::removeDeadBindings(const GRState* state,
const StackFrameContext *LCtx,
SymbolReaper& SymReaper) {
@@ -49,14 +49,14 @@
llvm::SmallVector<const MemRegion*, 10> RegionRoots;
GRState NewState = *state;
- NewState.Env = EnvMgr.RemoveDeadBindings(NewState.Env, SymReaper,
+ NewState.Env = EnvMgr.removeDeadBindings(NewState.Env, SymReaper,
state, RegionRoots);
// Clean up the store.
- NewState.St = StoreMgr->RemoveDeadBindings(NewState.St, LCtx,
+ NewState.St = StoreMgr->removeDeadBindings(NewState.St, LCtx,
SymReaper, RegionRoots);
state = getPersistentState(NewState);
- return ConstraintMgr->RemoveDeadBindings(state, SymReaper);
+ return ConstraintMgr->removeDeadBindings(state, SymReaper);
}
const GRState *GRStateManager::MarshalState(const GRState *state,
Modified: cfe/trunk/lib/StaticAnalyzer/RangeConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/RangeConstraintManager.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/RangeConstraintManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/RangeConstraintManager.cpp Fri Jan 14 14:34:15 2011
@@ -243,7 +243,7 @@
return i ? *i == V : false;
}
- const GRState* RemoveDeadBindings(const GRState* St, SymbolReaper& SymReaper);
+ const GRState* removeDeadBindings(const GRState* St, SymbolReaper& SymReaper);
void print(const GRState* St, llvm::raw_ostream& Out,
const char* nl, const char *sep);
@@ -268,7 +268,7 @@
/// Scan all symbols referenced by the constraints. If the symbol is not alive
/// as marked in LSymbols, mark it as dead in DSymbols.
const GRState*
-RangeConstraintManager::RemoveDeadBindings(const GRState* state,
+RangeConstraintManager::removeDeadBindings(const GRState* state,
SymbolReaper& SymReaper) {
ConstraintRangeTy CR = state->get<ConstraintRange>();
Modified: cfe/trunk/lib/StaticAnalyzer/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/RegionStore.cpp?rev=123460&r1=123459&r2=123460&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/RegionStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/RegionStore.cpp Fri Jan 14 14:34:15 2011
@@ -356,9 +356,9 @@
// State pruning.
//===------------------------------------------------------------------===//
- /// RemoveDeadBindings - Scans the RegionStore of 'state' for dead values.
+ /// removeDeadBindings - Scans the RegionStore of 'state' for dead values.
/// It returns a new Store with these values removed.
- Store RemoveDeadBindings(Store store, const StackFrameContext *LCtx,
+ Store removeDeadBindings(Store store, const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots);
@@ -1682,17 +1682,17 @@
//===----------------------------------------------------------------------===//
namespace {
-class RemoveDeadBindingsWorker :
- public ClusterAnalysis<RemoveDeadBindingsWorker> {
+class removeDeadBindingsWorker :
+ public ClusterAnalysis<removeDeadBindingsWorker> {
llvm::SmallVector<const SymbolicRegion*, 12> Postponed;
SymbolReaper &SymReaper;
const StackFrameContext *CurrentLCtx;
public:
- RemoveDeadBindingsWorker(RegionStoreManager &rm, GRStateManager &stateMgr,
+ removeDeadBindingsWorker(RegionStoreManager &rm, GRStateManager &stateMgr,
RegionBindings b, SymbolReaper &symReaper,
const StackFrameContext *LCtx)
- : ClusterAnalysis<RemoveDeadBindingsWorker>(rm, stateMgr, b,
+ : ClusterAnalysis<removeDeadBindingsWorker>(rm, stateMgr, b,
/* includeGlobals = */ false),
SymReaper(symReaper), CurrentLCtx(LCtx) {}
@@ -1706,7 +1706,7 @@
};
}
-void RemoveDeadBindingsWorker::VisitAddedToCluster(const MemRegion *baseR,
+void removeDeadBindingsWorker::VisitAddedToCluster(const MemRegion *baseR,
RegionCluster &C) {
if (const VarRegion *VR = dyn_cast<VarRegion>(baseR)) {
@@ -1740,13 +1740,13 @@
}
}
-void RemoveDeadBindingsWorker::VisitCluster(const MemRegion *baseR,
+void removeDeadBindingsWorker::VisitCluster(const MemRegion *baseR,
BindingKey *I, BindingKey *E) {
for ( ; I != E; ++I)
VisitBindingKey(*I);
}
-void RemoveDeadBindingsWorker::VisitBinding(SVal V) {
+void removeDeadBindingsWorker::VisitBinding(SVal V) {
// Is it a LazyCompoundVal? All referenced regions are live as well.
if (const nonloc::LazyCompoundVal *LCS =
dyn_cast<nonloc::LazyCompoundVal>(&V)) {
@@ -1771,7 +1771,7 @@
SymReaper.markLive(*SI);
}
-void RemoveDeadBindingsWorker::VisitBindingKey(BindingKey K) {
+void removeDeadBindingsWorker::VisitBindingKey(BindingKey K) {
const MemRegion *R = K.getRegion();
// Mark this region "live" by adding it to the worklist. This will cause
@@ -1804,7 +1804,7 @@
VisitBinding(*V);
}
-bool RemoveDeadBindingsWorker::UpdatePostponed() {
+bool removeDeadBindingsWorker::UpdatePostponed() {
// See if any postponed SymbolicRegions are actually live now, after
// having done a scan.
bool changed = false;
@@ -1822,13 +1822,13 @@
return changed;
}
-Store RegionStoreManager::RemoveDeadBindings(Store store,
+Store RegionStoreManager::removeDeadBindings(Store store,
const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots)
{
RegionBindings B = GetRegionBindings(store);
- RemoveDeadBindingsWorker W(*this, StateMgr, B, SymReaper, LCtx);
+ removeDeadBindingsWorker W(*this, StateMgr, B, SymReaper, LCtx);
W.GenerateClusters();
// Enqueue the region roots onto the worklist.
More information about the cfe-commits
mailing list