]> granicus.if.org Git - clang/commit
[analyzer] Teach RetainCountChecker about CVFooRetain
authorDevin Coughlin <dcoughlin@apple.com>
Thu, 11 Aug 2016 18:41:29 +0000 (18:41 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Thu, 11 Aug 2016 18:41:29 +0000 (18:41 +0000)
commit271e3dbddedabb82291728cb87e700bdb72e2369
tree21a14a108b629b04c71321aeaea80ae08e3614e7
parent79646f78be1b6852d1a618db200bd8554a086e85
[analyzer] Teach RetainCountChecker about CVFooRetain

Change the retain count checker to treat CoreFoundation-style "CV"-prefixed
reference types from CoreVideo similarly to CoreGraphics types. With this
change, we treat CVFooRetain() on a CVFooRef type as a retain. CVFooRelease()
APIs are annotated as consuming their parameter, so this change prevents false
positives about incorrect decrements of reference counts.

<rdar://problem/27116090>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278382 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
test/Analysis/retain-release.m