HomePhabricator

[analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers.

Description

[analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers.

It is not uncommon for the users to make their own wrappers around
CoreFoundation's CFRetain and CFRelease functions that are defensive
against null references. In such cases CFRetain is often incorrectly
marked as CF_RETURNS_RETAINED. Ignore said annotation and treat such
wrappers similarly to the regular CFRetain.

rdar://problem/31699502
Differential Revision: https://reviews.llvm.org/D38877

Details

Committed
dergachevOct 13 2017, 12:10 PM
Differential Revision
D38877: [analyzer] RetainCount: Accept "safe" CFRetain wrappers.
Parents
rL315735: [Hexagon] Minimize number of repeated constant extenders
Branches
Unknown
Tags
Unknown