Fariborz Jahanian | c515820 | 2010-05-07 00:28:49 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s |
| 2 | |
| 3 | // CHECK: v17@0:8{vector<float, float, float>=}16 |
| 4 | // CHECK: {vector<float, float, float>=} |
John McCall | a9e6e8d | 2010-05-17 23:56:34 +0000 | [diff] [blame^] | 5 | // CHECK: v24@0:816 |
Fariborz Jahanian | c515820 | 2010-05-07 00:28:49 +0000 | [diff] [blame] | 6 | |
| 7 | template <typename T1, typename T2, typename T3> struct vector { |
| 8 | vector(T1,T2,T3); |
| 9 | }; |
| 10 | |
| 11 | typedef vector< float, float, float > vector3f; |
| 12 | |
| 13 | @interface SceneNode |
| 14 | { |
| 15 | vector3f position; |
| 16 | } |
| 17 | |
| 18 | @property (assign, nonatomic) vector3f position; |
| 19 | |
| 20 | @end |
| 21 | |
| 22 | @interface MyOpenGLView |
| 23 | { |
| 24 | @public |
| 25 | vector3f position; |
| 26 | } |
| 27 | @property vector3f position; |
| 28 | @end |
| 29 | |
| 30 | @implementation MyOpenGLView |
| 31 | |
| 32 | @synthesize position; |
| 33 | |
| 34 | -(void)awakeFromNib { |
| 35 | SceneNode *sn; |
| 36 | vector3f VF3(1.0, 1.0, 1.0); |
| 37 | [sn setPosition:VF3]; |
| 38 | } |
| 39 | @end |
John McCall | a9e6e8d | 2010-05-17 23:56:34 +0000 | [diff] [blame^] | 40 | |
| 41 | |
| 42 | class Int3 { int x, y, z; }; |
| 43 | |
| 44 | // Enforce @encoding for member pointers. |
| 45 | @interface MemPtr {} |
| 46 | - (void) foo: (int (Int3::*)) member; |
| 47 | @end |
| 48 | @implementation MemPtr |
| 49 | - (void) foo: (int (Int3::*)) member { |
| 50 | } |
| 51 | @end |