blob: e9416fe029291ad4b846787b1edf0114322c6fce [file] [log] [blame]
John McCall24fc0de2011-07-06 00:26:06 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -x objective-c %s.result
Argyrios Kyrtzidisbdf3ca92011-06-16 02:41:46 +00002// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fobjc-nonfragile-abi -fsyntax-only %s > %t
John McCalld70fb982011-06-15 23:25:17 +00003// RUN: diff %t %s.result
4
5#include "Common.h"
6
Argyrios Kyrtzidisce9b7392011-07-12 22:05:17 +00007__attribute__((objc_arc_weak_reference_unavailable))
8@interface WeakOptOut
9@end
10
11@class _NSCachedAttributedString;
12
13typedef _NSCachedAttributedString *BadClassForWeak;
14
John McCalld70fb982011-06-15 23:25:17 +000015@interface Foo : NSObject {
Argyrios Kyrtzidisce9b7392011-07-12 22:05:17 +000016 Foo *x, *w, *q1, *q2;
17 Foo *z1, *__unsafe_unretained z2;
18 WeakOptOut *oo;
19 BadClassForWeak bcw;
20 id not_safe1;
21 NSObject *not_safe2;
John McCalld70fb982011-06-15 23:25:17 +000022}
Argyrios Kyrtzidisce9b7392011-07-12 22:05:17 +000023@property (readonly,assign) Foo *x;
24@property (assign) Foo *w;
25@property (assign) Foo *q1, *q2;
26@property (assign) Foo *z1, *z2;
27@property (assign) WeakOptOut *oo;
28@property (assign) BadClassForWeak bcw;
29@property (assign) id not_safe1;
30@property (assign) NSObject *not_safe2;
John McCalld70fb982011-06-15 23:25:17 +000031@end
32
33@implementation Foo
Argyrios Kyrtzidisce9b7392011-07-12 22:05:17 +000034@synthesize x,w,q1,q2,z1,z2,oo,bcw,not_safe1,not_safe2;
John McCalld70fb982011-06-15 23:25:17 +000035@end