• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -x objective-c %s.result
2// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fobjc-nonfragile-abi -fsyntax-only %s > %t
3// RUN: diff %t %s.result
4
5#include "Common.h"
6
7__attribute__((objc_arc_weak_reference_unavailable))
8@interface WeakOptOut
9@end
10
11@class _NSCachedAttributedString;
12typedef _NSCachedAttributedString *BadClassForWeak;
13
14@class Forw;
15
16@interface Foo : NSObject {
17  Foo *x, *w, *q1, *q2;
18  WeakOptOut *oo;
19  BadClassForWeak bcw;
20  id not_safe1;
21  NSObject *not_safe2;
22  Forw *not_safe3;
23}
24@property (readonly,assign) Foo *x;
25@property (assign) Foo *w;
26@property Foo *q1, *q2;
27@property (assign) WeakOptOut *oo;
28@property (assign) BadClassForWeak bcw;
29@property (assign) id not_safe1;
30@property () NSObject *not_safe2;
31@property Forw *not_safe3;
32
33@property (assign) Foo *no_user_ivar1;
34@property (readonly) Foo *no_user_ivar2;
35@end
36
37@implementation Foo
38@synthesize x,w,q1,q2,oo,bcw,not_safe1,not_safe2,not_safe3;
39@synthesize no_user_ivar1, no_user_ivar2;
40@end
41