summaryrefslogtreecommitdiff
path: root/test/SemaObjC/iboutlet.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/iboutlet.m')
-rw-r--r--test/SemaObjC/iboutlet.m16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/SemaObjC/iboutlet.m b/test/SemaObjC/iboutlet.m
index 3c7f9581e663..63eac9af8a52 100644
--- a/test/SemaObjC/iboutlet.m
+++ b/test/SemaObjC/iboutlet.m
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Wno-objc-root-class -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -Wno-objc-root-class -Wreceiver-is-weak -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-arc -Wno-objc-root-class -Wreceiver-is-weak -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
// rdar://11448209
#define READONLY readonly
@@ -40,3 +40,15 @@
@implementation RKTFHView
@synthesize synthReadOnlyReadWrite=_synthReadOnlyReadWrite;
@end
+
+// rdar://15885642
+@interface WeakOutlet
+@property IBOutlet __weak WeakOutlet* WeakProp;
+@end
+
+WeakOutlet* func() {
+ __weak WeakOutlet* pwi;
+ pwi.WeakProp = (WeakOutlet*)0;
+ pwi.WeakProp = pwi.WeakProp;
+ return pwi.WeakProp;
+}