1*67e74705SXin Li// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp 2*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 3*67e74705SXin Li// rdar://14932320 4*67e74705SXin Li 5*67e74705SXin Liextern "C" void *sel_registerName(const char *); 6*67e74705SXin Litypedef unsigned long size_t; 7*67e74705SXin Li 8*67e74705SXin Litypedef struct { 9*67e74705SXin Li unsigned long long x; 10*67e74705SXin Li unsigned long long y; 11*67e74705SXin Li} myPoint; 12*67e74705SXin Li 13*67e74705SXin Litypedef struct { 14*67e74705SXin Li unsigned long long x; 15*67e74705SXin Li unsigned long long y; 16*67e74705SXin Li} allPoint; 17*67e74705SXin Li 18*67e74705SXin Li@interface Obj 19*67e74705SXin Li+ (myPoint)foo; 20*67e74705SXin Li+ (myPoint)foo : (int)Arg1 : (double)fArg; 21*67e74705SXin Li+ (allPoint)fee; 22*67e74705SXin Li@end 23*67e74705SXin Li 24*67e74705SXin Li@implementation Obj 25*67e74705SXin Li+ (allPoint)fee { 26*67e74705SXin Li allPoint a; 27*67e74705SXin Li a.x = a.y = 3; 28*67e74705SXin Li 29*67e74705SXin Li return a; 30*67e74705SXin Li} 31*67e74705SXin Li+ (myPoint)foo { 32*67e74705SXin Li myPoint r; 33*67e74705SXin Li r.x = 1; 34*67e74705SXin Li r.y = 2; 35*67e74705SXin Li return r; 36*67e74705SXin Li} 37*67e74705SXin Li 38*67e74705SXin Li+ (myPoint)foo : (int)Arg1 : (double)fArg { 39*67e74705SXin Li myPoint r; 40*67e74705SXin Li return r; 41*67e74705SXin Li} 42*67e74705SXin Li@end 43*67e74705SXin Li 44*67e74705SXin LimyPoint Ret_myPoint() { 45*67e74705SXin Li return [Obj foo]; 46*67e74705SXin Li} 47*67e74705SXin Li 48*67e74705SXin LiallPoint Ret_allPoint() { 49*67e74705SXin Li return [Obj fee]; 50*67e74705SXin Li} 51*67e74705SXin Li 52*67e74705SXin LimyPoint Ret_myPoint1(int i, double d) { 53*67e74705SXin Li return [Obj foo:i:d]; 54*67e74705SXin Li} 55*67e74705SXin Li 56*67e74705SXin LimyPoint Ret_myPoint2() { 57*67e74705SXin Li return [Obj foo]; 58*67e74705SXin Li} 59