summaryrefslogtreecommitdiffstats
path: root/clang/test/Rewriter/rewrite-unique-block-api.mm
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-02-10 20:18:25 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-02-10 20:18:25 +0000
commitc3bdefa08dfb8d99ff0475309dbb8d4ca5144bb3 (patch)
tree89e99efe8e905f90e36dcc9cda7bf35d16a98311 /clang/test/Rewriter/rewrite-unique-block-api.mm
parent97c5902e788c16db45da6f702ebde2cc54cfad87 (diff)
downloadbcm5719-llvm-c3bdefa08dfb8d99ff0475309dbb8d4ca5144bb3.tar.gz
bcm5719-llvm-c3bdefa08dfb8d99ff0475309dbb8d4ca5144bb3.zip
Patch to rewrite blocks into unique api names.
Fixes radar 7630551 llvm-svn: 95796
Diffstat (limited to 'clang/test/Rewriter/rewrite-unique-block-api.mm')
-rw-r--r--clang/test/Rewriter/rewrite-unique-block-api.mm31
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/test/Rewriter/rewrite-unique-block-api.mm b/clang/test/Rewriter/rewrite-unique-block-api.mm
new file mode 100644
index 00000000000..780a3f0a5e2
--- /dev/null
+++ b/clang/test/Rewriter/rewrite-unique-block-api.mm
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
+// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
+// radar 7630551
+
+void f(void (^b)(char c));
+
+@interface a
+- (void)processStuff;
+@end
+
+@implementation a
+- (void)processStuff {
+ f(^(char x) { });
+}
+@end
+
+@interface b
+- (void)processStuff;
+@end
+
+@implementation b
+- (void)processStuff {
+ f(^(char x) { });
+}
+@end
+
+// CHECK-LP: struct __a__processStuff_block_impl_0
+// CHECK-LP: static void __a__processStuff_block_func_0
+
+// CHECK-LP: struct __b__processStuff_block_impl_0
+// CHECK-LP: static void __b__processStuff_block_func_0
OpenPOWER on IntegriCloud