]> granicus.if.org Git - clang/commit
[analyzer] Malloc: reason about the ObjC messages and C++.
authorAnna Zaks <ganna@apple.com>
Fri, 24 Feb 2012 23:56:53 +0000 (23:56 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 24 Feb 2012 23:56:53 +0000 (23:56 +0000)
commit3cd89ad193834e766ce5dc24e260aa8615d0d5e1
tree23d1ef8c44b410a3aeaa4aa0a9903d02d484f6e7
parented878af7914df535b32d64f555fa118413186672
[analyzer] Malloc: reason about the ObjC messages and C++.

Assume none of the ObjC messages defined in system headers free memory,
except for the ones containing 'freeWhenDone' selector. Currently, just
assume that the region escapes to the messages with 'freeWhenDone'
(ideally, we want to treat it as 'free()').

For now, always assume that regions escape when passed to C++ methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151410 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
test/Analysis/malloc.mm
test/Analysis/system-header-simulator-objc.h [new file with mode: 0644]