Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o %t %s |
Fariborz Jahanian | 35c3329 | 2009-01-12 23:27:26 +0000 | [diff] [blame] | 2 | |
3 | typedef struct { | ||||
4 | unsigned f0; | ||||
5 | } s0; | ||||
6 | |||||
7 | @interface A | ||||
8 | - (s0) f0; | ||||
9 | @end | ||||
10 | |||||
11 | @implementation A | ||||
Mike Stump | 6303891 | 2009-07-21 20:50:41 +0000 | [diff] [blame] | 12 | -(s0) f0{ while (1) {} } |
Fariborz Jahanian | 35c3329 | 2009-01-12 23:27:26 +0000 | [diff] [blame] | 13 | - (unsigned) bar { |
14 | return self.f0.f0; | ||||
15 | } | ||||
16 | @end | ||||
17 | |||||
Fariborz Jahanian | d2e1eb0 | 2009-09-01 17:02:21 +0000 | [diff] [blame] | 18 | |
19 | typedef struct _NSSize { | ||||
20 | float width; | ||||
21 | float height; | ||||
22 | } NSSize; | ||||
23 | |||||
24 | |||||
25 | @interface AnObject | ||||
26 | { | ||||
27 | NSSize size; | ||||
28 | } | ||||
29 | |||||
30 | @property NSSize size; | ||||
31 | |||||
32 | @end | ||||
33 | |||||
34 | float f () | ||||
35 | { | ||||
36 | AnObject* obj; | ||||
37 | return (obj.size).width; | ||||
38 | } |