[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / tentative-property-decl.m
bloba9649b644c3101a84c49472ab2af21d667063f75
1 // RUN: %clang_cc1 -fsyntax-only -Weverything -verify %s
2 // expected-no-diagnostics
3 // rdar://11656982
4 /** A property may not be both 'readonly' and having a memory management attribute
5     (copy/retain/etc.). But, property declaration in primary class and protcols
6     are tentative as they may be overridden into a 'readwrite' property in class 
7     extensions. So, do not issue any warning on 'readonly' and memory management
8     attributes in a property.
9 */
11 @interface Super {
13 @end
15 @class NSString;
17 @interface MyClass : Super
18 @property(nonatomic, copy, readonly) NSString *prop;
19 @property(nonatomic, copy, readonly) id warnProp;
20 @end
22 @interface MyClass ()
23 @property(nonatomic, copy, readwrite) NSString *prop;
24 @end
26 @implementation MyClass
27 @synthesize prop;
28 @synthesize warnProp;
29 @end
32 @protocol P
33 @property(nonatomic, copy, readonly) NSString *prop;
34 @property(nonatomic, copy, readonly) id warnProp;
35 @end
37 @interface YourClass : Super <P>
38 @end
40 @interface YourClass ()
41 @property(nonatomic, copy, readwrite) NSString *prop;
42 @end
44 @implementation YourClass 
45 @synthesize prop;
46 @synthesize warnProp;
47 @end