[analyzer] Extend the ObjCAutoreleaseWriteChecker to warn on captures as well
authorGeorge Karpenkov <ekarpenkov@apple.com>
Mon, 14 May 2018 21:39:54 +0000 (21:39 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Mon, 14 May 2018 21:39:54 +0000 (21:39 +0000)
commit434019a61744e23c6c90bf62a708ff38a0826137
tree8000ba02f14864f789e69af6b4dc65b9c89df638
parenteda977f414fead94b5072dd35d53be2fa71c5f00
[analyzer] Extend the ObjCAutoreleaseWriteChecker to warn on captures as well

A common pattern is that the code in the block does not write into the
variable explicitly, but instead passes it to a helper function which
performs the write.

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

llvm-svn: 332300
clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp
clang/test/Analysis/autoreleasewritechecker_test.m