1 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -x objective-c %s.result
2 // RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -x objective-c %s > %t
3 // RUN: diff %t %s.result
4 // RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -x objective-c++ %s > %t
5 // RUN: diff %t %s.result
10 void test1(CFTypeRef *cft) {
11 id x = NSMakeCollectable(cft);
30 @property (retain) id prop;
43 __attribute__((objc_arc_weak_reference_unavailable))
51 @property (assign) I3 *__weak pw1, *__weak pw2;
52 @property (assign) I3 *__strong ps;
53 @property (assign) I3 * pds;
62 @property (assign) I4Impl *__weak pw1, *__weak pw2;
63 @property (assign) I4Impl *__strong ps;
64 @property (assign) I4Impl * pds;
65 @property (assign) I4Impl * pds2;
66 @property (readwrite) I4Impl * pds3;
67 @property (readonly) I4Impl * pds4;
68 @property (readonly) __weak I4Impl *pw3;
69 @property (assign) __weak I4Impl *pw4;
72 @implementation I4Impl
73 @synthesize pw1, pw2, pw3, pw4, ps, pds, pds2, pds3, pds4;
75 -(void)test1:(CFTypeRef *)cft {
76 id x = NSMakeCollectable(cft);
81 @interface rdar10532449
82 @property (assign) id assign_prop;
83 @property (assign, readonly) id __strong strong_readonly_prop;
84 @property (assign) id __weak weak_prop;
87 @implementation rdar10532449
88 @synthesize assign_prop, strong_readonly_prop, weak_prop;
91 void test2(id p, __strong I1 *ap[]) {
92 for (__strong I1 *specRule in p) {