]> granicus.if.org Git - clang/commit
[Objective-C] Fix "repeated use of weak" warning with -fobjc-weak
authorBrian Kelley <bkelley@microsoft.com>
Wed, 29 Mar 2017 17:55:11 +0000 (17:55 +0000)
committerBrian Kelley <bkelley@microsoft.com>
Wed, 29 Mar 2017 17:55:11 +0000 (17:55 +0000)
commitf884a84581cc04739b945fa4c6068bc1a233f718
tree5344d92c9cd8a183c0eb940ba9815740fae6f813
parent16b7f511e8cd5f5ea6c57a11a238f4aa56d33d7f
[Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

Summary: -Warc-repeated-use-of-weak should produce the same warnings with -fobjc-weak as it does with -objc-arc. Also check for ObjCWeak along with ObjCAutoRefCount when recording the use of an evaluated weak variable. Add a -fobjc-weak run to the existing arc-repeated-weak test case and adapt it slightly to work in both modes.

Reviewers: rsmith, doug.gregor, jordan_rose, rjmccall

Reviewed By: rjmccall

Subscribers: arphaman, rjmccall, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299011 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Type.h
lib/AST/Type.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprMember.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/SemaPseudoObject.cpp
test/SemaObjC/arc-repeated-weak.mm