aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Rewriter
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-09-09 19:59:59 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-09-09 19:59:59 +0000
commitb1a2124652c738663d2fc8ba7f865385d4e9c156 (patch)
treed83300cef64c12c966c7cf7dbe381b7aee607802 /clang/test/Rewriter
parent98c64d4dcab1c92dd1f2b55a791beec92923da76 (diff)
downloadllvm-b1a2124652c738663d2fc8ba7f865385d4e9c156.zip
llvm-b1a2124652c738663d2fc8ba7f865385d4e9c156.tar.gz
llvm-b1a2124652c738663d2fc8ba7f865385d4e9c156.tar.bz2
Modern ObjectiveC translator. Fix translation of
message sent to aggregate-valued methods. Fix visibility of trampoline type used in translation of such expressions. // rdar://14932320 llvm-svn: 190341
Diffstat (limited to 'clang/test/Rewriter')
-rw-r--r--clang/test/Rewriter/objc-modern-StretAPI-3.mm58
1 files changed, 58 insertions, 0 deletions
diff --git a/clang/test/Rewriter/objc-modern-StretAPI-3.mm b/clang/test/Rewriter/objc-modern-StretAPI-3.mm
new file mode 100644
index 0000000..3ada56e
--- /dev/null
+++ b/clang/test/Rewriter/objc-modern-StretAPI-3.mm
@@ -0,0 +1,58 @@
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
+// 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
+// rdar://14932320
+
+extern "C" void *sel_registerName(const char *);
+typedef unsigned long size_t;
+
+typedef struct {
+ unsigned long long x;
+ unsigned long long y;
+} myPoint;
+
+typedef struct {
+ unsigned long long x;
+ unsigned long long y;
+} allPoint;
+
+@interface Obj
++ (myPoint)foo;
++ (myPoint)foo : (int)Arg1 : (double)fArg;
++ (allPoint)fee;
+@end
+
+@implementation Obj
++ (allPoint)fee {
+ allPoint a;
+ a.x = a.y = 3;
+
+ return a;
+}
++ (myPoint)foo {
+ myPoint r;
+ r.x = 1;
+ r.y = 2;
+ return r;
+}
+
++ (myPoint)foo : (int)Arg1 : (double)fArg {
+ myPoint r;
+ return r;
+}
+@end
+
+myPoint Ret_myPoint() {
+ return [Obj foo];
+}
+
+allPoint Ret_allPoint() {
+ return [Obj fee];
+}
+
+myPoint Ret_myPoint1(int i, double d) {
+ return [Obj foo:i:d];
+}
+
+myPoint Ret_myPoint2() {
+ return [Obj foo];
+}