Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz!
[clang.git] / test / SemaObjC / property-7.m
blobe6cba50f7a61b9caaaa264cfd75f129497539187
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 typedef signed char BOOL;
3 typedef struct _NSZone NSZone;
5 @protocol NSObject
6 - (BOOL)isEqual:(id)object;
7 @end
9 @protocol NSCopying
10 - (id)copyWithZone:(NSZone *)zone;
11 @end
13 @interface NSObject <NSObject> {}
14 @end
16 @class NSString, NSData, NSMutableData, NSMutableDictionary, NSMutableArray;
18 @interface SCMObject : NSObject <NSCopying> {}
19   @property(assign) SCMObject *__attribute__((objc_gc(weak))) parent;
20 @end
22 @interface SCMNode : SCMObject
24   NSString *_name;
26 @property(copy) NSString *name;
27 @end
29 @implementation SCMNode
30   @synthesize name = _name;
31   - (void) setParent:(SCMObject *__attribute__((objc_gc(weak)))) inParent {
32     super.parent = inParent;
33   }
34 @end