]> granicus.if.org Git - clang/commit
[analyzer] Track malloc'd regions stored in structs.
authorJordan Rose <jordan_rose@apple.com>
Wed, 8 Aug 2012 18:23:31 +0000 (18:23 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 8 Aug 2012 18:23:31 +0000 (18:23 +0000)
commit0d53ab4024488d0c6cd283992be3fd4b67099bd3
tree2d6a8de8cff82ab71bdcd98a0c649b77fecebffb
parente0d24eb1060a213ec9820dc02c45f26b2d5b348b
[analyzer] Track malloc'd regions stored in structs.

The main blocker on this (besides the previous commit) was that
ScanReachableSymbols was not looking through LazyCompoundVals.
Once that was fixed, it's easy enough to clear out malloc data on return,
just like we do when we bind to a global region.

<rdar://problem/10872635>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161511 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
lib/StaticAnalyzer/Core/ProgramState.cpp
test/Analysis/malloc-annotations.c
test/Analysis/malloc.c