blob: 5a49feb706c9ac0bac7c5bab74d029ba42f633e0 [file] [log] [blame]
Fariborz Jahanian6fb94392010-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 McCall532ec7b2010-05-17 23:56:34 +00005// CHECK: v24@0:816
Fariborz Jahanian6fb94392010-05-07 00:28:49 +00006
7template <typename T1, typename T2, typename T3> struct vector {
Douglas Gregor68dd3ee2010-05-20 02:24:22 +00008 vector();
9 vector(T1,T2,T3);
Fariborz Jahanian6fb94392010-05-07 00:28:49 +000010};
11
12typedef vector< float, float, float > vector3f;
13
14@interface SceneNode
15{
16 vector3f position;
17}
18
19@property (assign, nonatomic) vector3f position;
20
21@end
22
23@interface MyOpenGLView
24{
25@public
26 vector3f position;
27}
28@property vector3f position;
29@end
30
31@implementation MyOpenGLView
32
33@synthesize position;
34
35-(void)awakeFromNib {
36 SceneNode *sn;
37 vector3f VF3(1.0, 1.0, 1.0);
38 [sn setPosition:VF3];
39}
40@end
John McCall532ec7b2010-05-17 23:56:34 +000041
42
43class Int3 { int x, y, z; };
44
45// Enforce @encoding for member pointers.
46@interface MemPtr {}
47- (void) foo: (int (Int3::*)) member;
48@end
49@implementation MemPtr
50- (void) foo: (int (Int3::*)) member {
51}
52@end
Fariborz Jahaniane6012c72010-10-07 21:25:25 +000053
54// rdar: // 8519948
55typedef float HGVec4f __attribute__ ((vector_size(16)));
56
57@interface RedBalloonHGXFormWrapper {
58 HGVec4f m_Transform[4];
59}
60@end
61
62@implementation RedBalloonHGXFormWrapper
63@end
64