aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/Environment.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-08-06 00:29:57 +0000
committerTed Kremenek <kremenek@apple.com>2011-08-06 00:29:57 +0000
commitbea2753da897ede723e70bcd17023d050b0603d0 (patch)
tree1b3dedcc27352f2233932c2f5ffe4ed65cb5baed /lib/StaticAnalyzer/Core/Environment.cpp
parent5a58c6d66db05ad17673e2258946b61898721cd7 (diff)
[analyzer] Change SymbolReaper to store region roots implied by the Environment, allowing it be queried when
determining if symbols derived from regions are still live. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/Environment.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/Environment.cpp b/lib/StaticAnalyzer/Core/Environment.cpp
index b34a481e32..a695437f26 100644
--- a/lib/StaticAnalyzer/Core/Environment.cpp
+++ b/lib/StaticAnalyzer/Core/Environment.cpp
@@ -143,8 +143,7 @@ static inline bool IsLocation(const Stmt *S) {
Environment
EnvironmentManager::removeDeadBindings(Environment Env,
SymbolReaper &SymReaper,
- const GRState *ST,
- SmallVectorImpl<const MemRegion*> &DRoots) {
+ const GRState *ST) {
// We construct a new Environment object entirely, as this is cheaper than
// individually removing all the subexpression bindings (which will greatly
@@ -175,8 +174,8 @@ EnvironmentManager::removeDeadBindings(Environment Env,
// If the block expr's value is a memory region, then mark that region.
if (isa<loc::MemRegionVal>(X)) {
- const MemRegion* R = cast<loc::MemRegionVal>(X).getRegion();
- DRoots.push_back(R);
+ const MemRegion *R = cast<loc::MemRegionVal>(X).getRegion();
+ SymReaper.markLive(R);
}
// Mark all symbols in the block expr's value live.