In the latest episode of "Deserializing bugs caused by accessors" the series reached...
[clang.git] / test / CodeGenObjCXX / encode.mm
blob5a49feb706c9ac0bac7c5bab74d029ba42f633e0
1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
3 // CHECK: v17@0:8{vector<float, float, float>=}16
4 // CHECK: {vector<float, float, float>=}
5 // CHECK: v24@0:816
7 template <typename T1, typename T2, typename T3> struct vector {
8   vector();
9   vector(T1,T2,T3);
12 typedef vector< float, float, float > vector3f;
14 @interface SceneNode
16  vector3f position;
19 @property (assign, nonatomic) vector3f position;
21 @end
23 @interface MyOpenGLView
25 @public
26   vector3f position;
28 @property vector3f position;
29 @end
31 @implementation MyOpenGLView
33 @synthesize position;
35 -(void)awakeFromNib {
36  SceneNode *sn;
37  vector3f VF3(1.0, 1.0, 1.0);
38  [sn setPosition:VF3];
40 @end
43 class Int3 { int x, y, z; };
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 {
52 @end
54 // rdar: // 8519948
55 typedef float HGVec4f __attribute__ ((vector_size(16)));
57 @interface RedBalloonHGXFormWrapper {
58   HGVec4f m_Transform[4];
60 @end
62 @implementation RedBalloonHGXFormWrapper
63 @end