[analyzer] Teach RetainCountChecker about VTCompressionSessionEncodeFrame()
authorDevin Coughlin <dcoughlin@apple.com>
Fri, 11 Nov 2016 21:31:38 +0000 (21:31 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Fri, 11 Nov 2016 21:31:38 +0000 (21:31 +0000)
commite477a0e5ec675ed3f15e746ef3f447faa2a1e419
treefd5f97026852ab47a3dab1877b6380174ab7d879
parent4d6fb72aa93dee764f2dac5dcf324bf45f062e4b
[analyzer] Teach RetainCountChecker about VTCompressionSessionEncodeFrame()

The context argument passed to VideoToolbox's
VTCompressionSessionEncodeFrame() function is ultimately passed to a callback
supplied when creating the compression session and so may be freed by that
callback.  To suppress false positives in this case, teach the retain count
checker to stop tracking that argument.

This isn't suppressed by the usual callback context mechanism because the call
to VTCompressionSessionEncodeFrame() doesn't include the callback itself.

rdar://problem/27685213

llvm-svn: 286633
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
clang/test/Analysis/retain-release.m