From 53992adde3eda3ccf9da63bc7e45673f043de18f Mon Sep 17 00:00:00 2001 From: rdivacky Date: Thu, 27 May 2010 15:17:06 +0000 Subject: Update clang to r104832. --- test/CodeGenObjCXX/encode.mm | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/CodeGenObjCXX/encode.mm (limited to 'test/CodeGenObjCXX/encode.mm') diff --git a/test/CodeGenObjCXX/encode.mm b/test/CodeGenObjCXX/encode.mm new file mode 100644 index 0000000..83fb31e --- /dev/null +++ b/test/CodeGenObjCXX/encode.mm @@ -0,0 +1,52 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s + +// CHECK: v17@0:8{vector=}16 +// CHECK: {vector=} +// CHECK: v24@0:816 + +template struct vector { + vector(); + vector(T1,T2,T3); +}; + +typedef vector< float, float, float > vector3f; + +@interface SceneNode +{ + vector3f position; +} + +@property (assign, nonatomic) vector3f position; + +@end + +@interface MyOpenGLView +{ +@public + vector3f position; +} +@property vector3f position; +@end + +@implementation MyOpenGLView + +@synthesize position; + +-(void)awakeFromNib { + SceneNode *sn; + vector3f VF3(1.0, 1.0, 1.0); + [sn setPosition:VF3]; +} +@end + + +class Int3 { int x, y, z; }; + +// Enforce @encoding for member pointers. +@interface MemPtr {} +- (void) foo: (int (Int3::*)) member; +@end +@implementation MemPtr +- (void) foo: (int (Int3::*)) member { +} +@end -- cgit v1.1