diff options
author | Brian Kelley <bkelley@microsoft.com> | 2017-03-29 18:09:02 +0000 |
---|---|---|
committer | Brian Kelley <bkelley@microsoft.com> | 2017-03-29 18:09:02 +0000 |
commit | 1cd6beccb6bb876db3bbfa763e8979d3b363f1fa (patch) | |
tree | c4adfa94b2c05c544414be95ed07ed5d4aadb637 /test/SemaObjCXX | |
parent | fa2e39d0daba9ee49c3c1ef7b3b643d5e2c228aa (diff) |
[Objective-C] Fix "weak-unavailable" warning with -fobjc-weak
Summary: clang should produce the same errors Objective-C classes that cannot be assigned to weak pointers under both -fobjc-arc and -fobjc-weak. Check for ObjCWeak along with ObjCAutoRefCount when analyzing pointer conversions. Add an -fobjc-weak pass to the existing arc-unavailable-for-weakref test cases to verify the behavior is the same.
Reviewers: rsmith, doug.gregor, rjmccall
Reviewed By: rjmccall
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D31006
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjCXX')
-rw-r--r-- | test/SemaObjCXX/arc-unavailable-for-weakref.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/SemaObjCXX/arc-unavailable-for-weakref.mm b/test/SemaObjCXX/arc-unavailable-for-weakref.mm index 2a80aebaf8..6528748df3 100644 --- a/test/SemaObjCXX/arc-unavailable-for-weakref.mm +++ b/test/SemaObjCXX/arc-unavailable-for-weakref.mm @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify %s +// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-weak -verify %s // rdar://9693477 __attribute__((objc_arc_weak_reference_unavailable)) |