]> granicus.if.org Git - clang/commit
[Sema][ObjC] Make sure -Wblock-capture-autoreleasing issues a warning
authorAkira Hatanaka <ahatanaka@apple.com>
Thu, 26 Jan 2017 18:13:06 +0000 (18:13 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Thu, 26 Jan 2017 18:13:06 +0000 (18:13 +0000)
commit3322605b76b54d4bdcd1e5074c007c777414e300
tree90630a0f32af5b43fd75d7cc36c59a5910ecf75d
parent28bb146918702a31dc27d83ca9d230152c8c6383
[Sema][ObjC] Make sure -Wblock-capture-autoreleasing issues a warning
even in the presence of nullability qualifiers.

This commit fixes bugs in r285031 where -Wblock-capture-autoreleasing
wouldn't issue warnings when the function parameters were annotated
with nullability qualifiers. Specifically, look through the sugar and
see if there is an AttributedType of kind attr_objc_ownership to
determine whether __autoreleasing was explicitly specified or implicitly
added by the compiler.

rdar://problem/30193488

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293194 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
test/SemaObjC/arc.m