1// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -verify -Weverything %s 2// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -verify -Weverything %s 3// rdar://12103400 4 5@class NSString; 6 7@interface MyClass 8 9@property (nonatomic, readonly) NSString* addingMemoryModel; 10 11@property (nonatomic, copy, readonly) NSString* matchingMemoryModel; 12 13@property (nonatomic, retain, readonly) NSString* addingNoNewMemoryModel; 14 15@property (readonly) NSString* none; 16@property (readonly) NSString* none1; 17 18@property (assign, readonly) NSString* changeMemoryModel; // expected-note {{property declared here}} 19 20@property (readonly) __weak id weak_prop; 21@property (readonly) __weak id weak_prop1; 22 23@property (assign, readonly) NSString* assignProperty; 24 25@property (readonly) NSString* readonlyProp; 26 27 28 29@end 30 31@interface MyClass () 32{ 33 NSString* _name; 34} 35 36@property (nonatomic, copy) NSString* addingMemoryModel; 37@property (nonatomic, copy) NSString* matchingMemoryModel; 38@property () NSString* addingNoNewMemoryModel; 39@property () NSString* none; 40@property (readwrite, retain) NSString* none1; 41 42@property (retain) NSString* changeMemoryModel; // expected-warning {{property attribute in class extension does not match the primary class}} 43@property () __weak id weak_prop; 44@property (readwrite) __weak id weak_prop1; 45 46@property (assign, readwrite) NSString* assignProperty; 47@property (assign) NSString* readonlyProp; 48@end 49 50// rdar://12214070 51@interface radar12214070 52@property (nonatomic, atomic, readonly) float propertyName; // expected-error {{property attributes 'atomic' and 'nonatomic' are mutually exclusive}} 53@end 54 55@interface radar12214070 () 56@property (atomic, nonatomic, readonly, readwrite) float propertyName; // expected-error {{property attributes 'readonly' and 'readwrite' are mutually exclusive}} \ 57 // expected-error {{property attributes 'atomic' and 'nonatomic' are mutually exclusive}} 58@end 59 60