[analyzer] Add dispatch_data_create as a special case in RetainCountChecker.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 8 Dec 2016 14:05:48 +0000 (14:05 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 8 Dec 2016 14:05:48 +0000 (14:05 +0000)
commita4e2541a7088e109ba52215bf338f0d362eadcff
tree9988e7a00f682facd717c246253c8c15ebb4e55b
parentc49fd8c47791572c142af48ac10c9e6bb486c03f
[analyzer] Add dispatch_data_create as a special case in RetainCountChecker.

This function receives a callback block. The analyzer suspects that this block
may be used to take care of releasing the libdispatch object returned from
the function. In fact, it doesn't - it only releases the raw data buffer.
Inform the analyzer about that. Fixes the resulting false negatives.

rdar://problem/22280098

Differential Revision: https://reviews.llvm.org/D27409

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