]> granicus.if.org Git - clang/commit
[analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject.
authorDevin Coughlin <dcoughlin@apple.com>
Thu, 3 Dec 2015 19:41:24 +0000 (19:41 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Thu, 3 Dec 2015 19:41:24 +0000 (19:41 +0000)
commita2892f01674eda2f73cbcaef629a1b2a6915e3ea
tree93117718425f81fd815a29a0900f97a532f16306
parent13ef8dfe58e08631874a8356f5cc6e7313961f38
[analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject.

Don't warn about addresses of stack-allocated blocks escaping if the block
region was cast with CK_CopyAndAutoreleaseBlockObject. These casts, which
are introduced in the implicit conversion operator for lambda-to-block
conversions, cause the block to be copied to the heap -- so the warning is
spurious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254639 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
test/Analysis/lambdas.mm