Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o %t %s |
Daniel Dunbar | b21d6af | 2008-09-04 04:36:23 +0000 | [diff] [blame] | 2 | |
Daniel Dunbar | 23afaad | 2009-11-17 08:57:36 +0000 | [diff] [blame] | 3 | int printf(const char *, ...); |
Daniel Dunbar | b21d6af | 2008-09-04 04:36:23 +0000 | [diff] [blame] | 4 | |
| 5 | @interface Root |
| 6 | -(id) alloc; |
| 7 | -(id) init; |
| 8 | @end |
| 9 | |
| 10 | @interface A : Root { |
| 11 | int x; |
Fariborz Jahanian | ae6f6fd | 2008-12-05 22:32:48 +0000 | [diff] [blame] | 12 | int y, ro, z; |
Daniel Dunbar | 739a36b | 2008-09-24 18:00:13 +0000 | [diff] [blame] | 13 | id ob0, ob1, ob2, ob3, ob4; |
Daniel Dunbar | b21d6af | 2008-09-04 04:36:23 +0000 | [diff] [blame] | 14 | } |
| 15 | @property int x; |
| 16 | @property int y; |
| 17 | @property int z; |
| 18 | @property(readonly) int ro; |
Daniel Dunbar | 739a36b | 2008-09-24 18:00:13 +0000 | [diff] [blame] | 19 | @property(assign) id ob0; |
| 20 | @property(retain) id ob1; |
| 21 | @property(copy) id ob2; |
| 22 | @property(retain, nonatomic) id ob3; |
| 23 | @property(copy, nonatomic) id ob4; |
Daniel Dunbar | b21d6af | 2008-09-04 04:36:23 +0000 | [diff] [blame] | 24 | @end |
| 25 | |
| 26 | @implementation A |
| 27 | @dynamic x; |
Fariborz Jahanian | ae6f6fd | 2008-12-05 22:32:48 +0000 | [diff] [blame] | 28 | @synthesize y; |
| 29 | @synthesize z = z; |
| 30 | @synthesize ro; |
Daniel Dunbar | 739a36b | 2008-09-24 18:00:13 +0000 | [diff] [blame] | 31 | @synthesize ob0; |
| 32 | @synthesize ob1; |
| 33 | @synthesize ob2; |
| 34 | @synthesize ob3; |
| 35 | @synthesize ob4; |
Daniel Dunbar | b21d6af | 2008-09-04 04:36:23 +0000 | [diff] [blame] | 36 | -(int) y { |
| 37 | return x + 1; |
| 38 | } |
| 39 | -(void) setZ: (int) arg { |
| 40 | x = arg - 1; |
| 41 | } |
| 42 | @end |
| 43 | |
| 44 | @interface A (Cat) |
| 45 | @property int dyn; |
| 46 | @end |
| 47 | |
| 48 | @implementation A (Cat) |
| 49 | -(int) dyn { |
| 50 | return 10; |
| 51 | } |
| 52 | @end |