summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2018-04-19 23:00:22 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2018-04-19 23:00:22 +0000
commitf7281b4752256d7ba02e230f594654a19e3d57dd (patch)
tree8e64fba5b81fac466e38366f433ad9b5f3325203 /clang/lib/Frontend/CompilerInvocation.cpp
parent0dbe57e7523b531374a96982a69b7a0fcb71db36 (diff)
downloadbcm5719-llvm-f7281b4752256d7ba02e230f594654a19e3d57dd.tar.gz
bcm5719-llvm-f7281b4752256d7ba02e230f594654a19e3d57dd.zip
[analyzer] RetainCount: Accept more "safe" CFRetain wrappers.
r315736 added support for the misplaced CF_RETURNS_RETAINED annotation on CFRetain() wrappers. It works by trusting the function's name (seeing if it confirms to the CoreFoundation naming convention) rather than the annotation. There are more false positives caused by users using a different naming convention, namely starting the function name with "retain" or "release" rather than suffixing it with "retain" or "release" respectively. Because this isn't according to the naming convention, these functions are usually inlined and the annotation is therefore ignored, which is correct. But sometimes we run out of inlining stack depth and the function is evaluated conservatively and then the annotation is trusted. Add support for the "alternative" naming convention and test the situation when we're running out of inlining stack depth. rdar://problem/18270122 Differential Revision: https://reviews.llvm.org/D45117 llvm-svn: 330375
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud