summaryrefslogtreecommitdiffstats
path: root/clang/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
commitc91ca30b4ce749ab3580bca9b10f463737932c46 (patch)
tree5961ce79b01f1df54508be2b9d2e0f3ed3e3e47c /clang/lib/StaticAnalyzer/Core/Environment.cpp
parent69b5341c6aa85cd178ef199f58b2a57526554ad9 (diff)
downloadbcm5719-llvm-c91ca30b4ce749ab3580bca9b10f463737932c46.tar.gz
bcm5719-llvm-c91ca30b4ce749ab3580bca9b10f463737932c46.zip
[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. llvm-svn: 137005
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/Environment.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp
index b34a481e327..a695437f26e 100644
--- a/clang/lib/StaticAnalyzer/Core/Environment.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud