]> granicus.if.org Git - clang/commit
[analyzer] Look for allocation site in the parent frames as well as the current one.
authorAnna Zaks <ganna@apple.com>
Thu, 5 Feb 2015 01:02:53 +0000 (01:02 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 5 Feb 2015 01:02:53 +0000 (01:02 +0000)
commit782f17cae23038ce3f12309daf36ba5ec8e518ee
treeb5a514ea7c564df72b8b49011b986d2df0c43352
parent4e4995f17f2308fbca71c557e2def84b6315399e
[analyzer] Look for allocation site in the parent frames as well as the current one.

Instead of handling edge cases (mostly involving blocks), where we have difficulty finding
an allocation statement, allow the allocation site to be in a parent node.

Previously we assumed that the allocation site can always be found in the same frame
as allocation, but there are scenarios in which an element is leaked in a child
frame but is allocated in the parent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228247 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
test/Analysis/objc-radar17039661.m