diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2015-12-10 09:28:06 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2015-12-10 09:28:06 +0000 |
commit | 733e71b73b35eccd467c50baf12214d85941f0b0 (patch) | |
tree | d817b5cda01584f26d1cc933c984924fb7a551fe /clang/lib/StaticAnalyzer/Core/Environment.cpp | |
parent | a5fbebc2065d12a403f82380cbe0c3a571cfccbe (diff) | |
download | bcm5719-llvm-733e71b73b35eccd467c50baf12214d85941f0b0.tar.gz bcm5719-llvm-733e71b73b35eccd467c50baf12214d85941f0b0.zip |
[analyzer] Fix symbolic element index lifetime.
SymbolReaper was destroying the symbol too early when it was referenced only
from an index SVal of a live ElementRegion.
In order to test certain aspects of this patch, extend the debug.ExprInspection
checker to allow testing SymbolReaper in a direct manner.
Differential Revision: http://reviews.llvm.org/D12726
llvm-svn: 255236
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/Environment.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp index d55858db576..e2cb52cb417 100644 --- a/clang/lib/StaticAnalyzer/Core/Environment.cpp +++ b/clang/lib/StaticAnalyzer/Core/Environment.cpp @@ -171,10 +171,6 @@ EnvironmentManager::removeDeadBindings(Environment Env, // Copy the binding to the new map. EBMapRef = EBMapRef.add(BlkExpr, X); - // If the block expr's value is a memory region, then mark that region. - if (Optional<loc::MemRegionVal> R = X.getAs<loc::MemRegionVal>()) - SymReaper.markLive(R->getRegion()); - // Mark all symbols in the block expr's value live. RSScaner.scan(X); continue; |