diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-21 22:26:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-21 22:26:05 +0000 |
commit | 16fbfe699ebc0fe96b7768632a46a4ff64646e07 (patch) | |
tree | 83a2505e17423737ce91fd9eeeb306c98180f276 /clang/lib/Analysis/CFRefCount.cpp | |
parent | 279eda627554755119d3a5efa79c7d97f6dbdfb6 (diff) | |
download | bcm5719-llvm-16fbfe699ebc0fe96b7768632a46a4ff64646e07.tar.gz bcm5719-llvm-16fbfe699ebc0fe96b7768632a46a4ff64646e07.zip |
Static Analyzer: Replace LiveSymbols/DeadSymbols sets with a new object called "SymbolReaper". Right now it just consolidates the two and cleans up some client code, but shortly it will be used to enable "lazy computation" of live symbols for use with RegionStore.
llvm-svn: 62722
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index c72d2a3070b..4731921731f 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -1367,9 +1367,9 @@ public: GRExprEngine& Engine, GRStmtNodeBuilder<GRState>& Builder, ExplodedNode<GRState>* Pred, - Stmt* S, - const GRState* St, - const GRStateManager::DeadSymbolsTy& Dead); + Stmt* S, const GRState* state, + SymbolReaper& SymReaper); + // Return statements. virtual void EvalReturn(ExplodedNodeSet<GRState>& Dst, @@ -1915,20 +1915,18 @@ void CFRefCount::EvalDeadSymbols(ExplodedNodeSet<GRState>& Dst, ExplodedNode<GRState>* Pred, Stmt* S, const GRState* St, - const GRStateManager::DeadSymbolsTy& Dead) { + SymbolReaper& SymReaper) { // FIXME: a lot of copy-and-paste from EvalEndPath. Refactor. RefBindings B = St->get<RefBindings>(); llvm::SmallVector<std::pair<SymbolRef,bool>, 10> Leaked; - for (GRStateManager::DeadSymbolsTy::const_iterator - I=Dead.begin(), E=Dead.end(); I!=E; ++I) { + for (SymbolReaper::dead_iterator I = SymReaper.dead_begin(), + E = SymReaper.dead_end(); I != E; ++I) { const RefVal* T = B.lookup(*I); - - if (!T) - continue; + if (!T) continue; bool hasLeak = false; |