Page MenuHomePhabricator

[analyzer] RetainCount: Bluntly suppress the CFRetain detection heuristic on a couple of CM functions.

Authored by NoQ on Dec 19 2018, 5:16 PM.



If it ends with "Retain" like CFRetain and returns a CFTypeRef like CFRetain, then it is not necessarily a CFRetain.

But it is indeed true that they return something retained.

Diff Detail

rC Clang

Event Timeline

NoQ created this revision.Dec 19 2018, 5:16 PM
NoQ updated this revision to Diff 178995.Dec 19 2018, 5:17 PM

Improve comments.

NoQ edited the summary of this revision. (Show Details)Dec 19 2018, 5:18 PM
dcoughlin accepted this revision.Dec 20 2018, 2:13 PM

This seems reasonable to me, but please have George take a look too.

This revision is now accepted and ready to land.Dec 20 2018, 2:13 PM

In general, I'm against hardcoding, and I think we should use the annotations indicating that the function does retain.
(or use a naming convention, and use an annotation to indicate that the function does not retain).

However, if this is prohibitive for some reason, we could use this approach as well.

This revision was automatically updated to reflect the committed changes.