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