]> granicus.if.org Git - clang/commit
[analyzer] Fix symbolic element index lifetime.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 10 Dec 2015 09:28:06 +0000 (09:28 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 10 Dec 2015 09:28:06 +0000 (09:28 +0000)
commit37ffc1a156dbbce81e4af2811b689d586d556de0
tree7c2b5ae3afc23a72ffd156848cdaba38cce12506
parentdfc7574e1ecf3d086577ca89ad94ef4d08ecc0cc
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255236 91177308-0d34-0410-b5e6-96231b3b80d8
docs/analyzer/DebugChecks.rst
include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
lib/StaticAnalyzer/Core/Environment.cpp
lib/StaticAnalyzer/Core/RegionStore.cpp
lib/StaticAnalyzer/Core/SymbolManager.cpp
test/Analysis/return-ptr-range.cpp [new file with mode: 0644]
test/Analysis/symbol-reaper.c [new file with mode: 0644]