blob: 4f472caa9cd193c8a2242c02165845f299b6714a [file] [log] [blame]
Fariborz Jahanianc5158202010-05-07 00:28:49 +00001// 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 McCalla9e6e8d2010-05-17 23:56:34 +00005// CHECK: v24@0:816
Fariborz Jahanianc5158202010-05-07 00:28:49 +00006
7template <typename T1, typename T2, typename T3> struct vector {
8 vector(T1,T2,T3);
9};
10
11typedef 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 McCalla9e6e8d2010-05-17 23:56:34 +000040
41
42class 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