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