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.
Paths
| Differential D55907
[analyzer] RetainCount: Bluntly suppress the CFRetain detection heuristic on a couple of CM functions. ClosedPublic Authored by NoQ on Dec 19 2018, 5:16 PM.
Details
Summary 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
Event TimelineHerald added subscribers: cfe-commits, dkrupp, donat.nagy and 6 others. · View Herald TranscriptDec 19 2018, 5:16 PM This revision is now accepted and ready to land.Dec 20 2018, 2:13 PM Comment Actions In general, I'm against hardcoding, and I think we should use the annotations indicating that the function does retain. However, if this is prohibitive for some reason, we could use this approach as well. Closed by commit rC349862: [analyzer] RetainCount: Suppress retain detection heuristic on some CM methods. (authored by NoQ). · Explain WhyDec 20 2018, 4:22 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 179200 lib/StaticAnalyzer/Core/RetainSummaryManager.cpp
test/Analysis/retain-release.m
|