]> granicus.if.org Git - clang/commit
[analyzer] StackAddrEscape: For now, disable the new async escape checks.
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 12 Dec 2017 02:59:09 +0000 (02:59 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 12 Dec 2017 02:59:09 +0000 (02:59 +0000)
commitbdf9e4656cff23b1d06ab5e5d4aac054c3472157
tree851c2afa48a18f860d49ae70ee26e404d90333e2
parent654c2358f5ded7fd788bb5d0c1befb530902fce7
[analyzer] StackAddrEscape: For now, disable the new async escape checks.

The new check introduced in r318705 is useful, but suffers from a particular
class of false positives, namely, it does not account for
dispatch_barrier_sync() API which allows one to ensure that the asyncronously
executed block that captures a pointer to a local variable does not actually
outlive that variable.

The new check is split into a separate checker, under the name of
alpha.core.StackAddressAsyncEscape, which is likely to get enabled by default
again once these positives are fixed. The rest of the StackAddressEscapeChecker
is still enabled by default.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320455 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
test/Analysis/stack-capture-leak-arc.mm
test/Analysis/stack-capture-leak-no-arc.mm