]> granicus.if.org Git - clang/commit
[analyzer] When reporting a leak in RetainCount checker due to an early exit from...
authorAnna Zaks <ganna@apple.com>
Wed, 10 Apr 2013 21:42:06 +0000 (21:42 +0000)
committerAnna Zaks <ganna@apple.com>
Wed, 10 Apr 2013 21:42:06 +0000 (21:42 +0000)
commit7a87e520e42c1e58c358e3a9a436ef17f551fd13
tree4462e7eba5edfea7dbb7a7a4f8878c7168866e33
parent27d99dd714895564b526b786284a46b40f53be01
[analyzer] When reporting a leak in RetainCount checker due to an early exit from init, step into init.

The heuristic here (proposed by Jordan) is that, usually, if a leak is due to an early exit from init, the allocation site will be
a call to alloc. Note that in other cases init resets self to [super init], which becomes the allocation site of the object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179221 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
test/Analysis/retain-release-path-notes.m