[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / iboutlet.m
blob1d8ec9965c2af3f3a591d6f37c3a6d28761ffbcc
1 // RUN: %clang_cc1 -fsyntax-only -fobjc-arc -Wno-objc-root-class -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
2 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-arc -Wno-objc-root-class -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
3 // rdar://11448209
5 #define READONLY readonly
7 @class NSView;
9 IB_DESIGNABLE @interface I
10 @property (getter = MyGetter, readonly, assign) IBOutlet NSView *myView; // expected-warning {{readonly IBOutlet property 'myView' when auto-synthesized may not work correctly with 'nib' loader}} expected-note {{property should be changed to be readwrite}}
12 IBInspectable @property (readonly) IBOutlet NSView *myView1; // expected-warning {{readonly IBOutlet property 'myView1' when auto-synthesized may not work correctly with 'nib' loader}} expected-note {{property should be changed to be readwrite}}
14 @property (getter = MyGetter2, READONLY) IBOutlet NSView *myView2; // expected-warning {{readonly IBOutlet property 'myView2' when auto-synthesized may not work correctly with 'nib' loader}}
16 @end
18 @implementation I
19 @end
22 // rdar://13123861
23 @class UILabel;
25 @interface NSObject @end
27 @interface RKTFHView : NSObject
28 @property( readonly ) __attribute__((iboutlet)) UILabel *autoReadOnlyReadOnly; // expected-warning {{readonly IBOutlet property 'autoReadOnlyReadOnly' when auto-synthesized may not work correctly with 'nib' loader}} expected-note {{property should be changed to be readwrite}}
29 @property( readonly ) __attribute__((iboutlet)) UILabel *autoReadOnlyReadWrite;
30 @property( readonly ) __attribute__((iboutlet)) UILabel *synthReadOnlyReadWrite;
31 @end
33 @interface RKTFHView()
34 @property( readwrite ) __attribute__((iboutlet)) UILabel *autoReadOnlyReadWrite;
35 @property( readwrite ) __attribute__((iboutlet)) UILabel *synthReadOnlyReadWrite;
36 @end
38 @implementation RKTFHView
39 @synthesize synthReadOnlyReadWrite=_synthReadOnlyReadWrite;
40 @end
42 // rdar://15885642
43 @interface WeakOutlet 
44 @property int Number;
45 @property IBOutlet __weak WeakOutlet* WeakProp;
46 @end
48 WeakOutlet* func() {
49   __weak WeakOutlet* pwi;
50   pwi.WeakProp = (WeakOutlet*)0;
51   pwi.WeakProp = pwi.WeakProp;
52   return pwi.WeakProp;
55 WeakOutlet* func2(WeakOutlet* pwi) {
56   [[pwi WeakProp] setNumber:0];
57   [[pwi WeakProp] setNumber:1];
58   return [pwi WeakProp];