[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)
commit81cc38cf9ad8fe2aaa3ac6203df4b5ff2d780ca4
tree8ff4b06fbcf67ce7c7eb580d001398ab93c43563
parent932bce6ade232aebfa91ac03be2b47563e8c4a8a
[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>

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