aboutsummaryrefslogtreecommitdiff
path: root/test/Rewriter
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-04-03 19:11:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-04-03 19:11:21 +0000
commitf9f30791dd20472675de012105219cd975ad1076 (patch)
tree82bec358073d78c43c64e83da870f611be834411 /test/Rewriter
parentbd25ff8632e18bb3af761369fd3b0f1b48fdf061 (diff)
Objective-C modern rewriter. Fixes a bug
rewriting typedef for a qualified object type and also when two declarations happen to be on the same line. // rdar://13562505 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Rewriter')
-rw-r--r--test/Rewriter/rewrite-modern-qualified-type.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Rewriter/rewrite-modern-qualified-type.mm b/test/Rewriter/rewrite-modern-qualified-type.mm
new file mode 100644
index 0000000000..53e0d23ef2
--- /dev/null
+++ b/test/Rewriter/rewrite-modern-qualified-type.mm
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
+// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D_Bool=bool -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
+// rdar://13562505
+
+@protocol OS_dispatch_object @end
+
+@interface NSObject @end
+
+@protocol OS_dispatch_queue <OS_dispatch_object> @end typedef NSObject<OS_dispatch_queue> *dispatch_queue_t;
+
+typedef id<OS_dispatch_queue> dispatch_queue_i;