20 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wobjc-property-assign-on-object-type %s2 3@interface Foo @end4@protocol Prot @end5 6@interface Bar7@property(assign, readonly) Foo* o1; // expected-warning {{'assign' property of object type may become a dangling reference; consider using 'unsafe_unretained'}}8@property(unsafe_unretained, readonly) Foo* o2;9 10@property(assign) Class classProperty;11@property(assign) Class<Prot> classWithProtocolProperty;12@property(assign) int s1;13@property(assign) int* s2;14@end15 16@interface Bar ()17@property(readwrite) Foo* o1;18@property(readwrite) Foo* o2;19@end20