summaryrefslogtreecommitdiffstats
path: root/clang/test/Rewriter/rewrite-block-pointer.mm
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-02-16 17:26:03 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-02-16 17:26:03 +0000
commitb6a68c04655e749a978b2ee7e9a80409a396fd00 (patch)
tree3c413c6d7663c358ef3cf77e2ce5d2ad3bfc0f09 /clang/test/Rewriter/rewrite-block-pointer.mm
parent70aa8d074599e622822d208512e8fc71f0ec4f8d (diff)
downloadbcm5719-llvm-b6a68c04655e749a978b2ee7e9a80409a396fd00.tar.gz
bcm5719-llvm-b6a68c04655e749a978b2ee7e9a80409a396fd00.zip
Minor rewriter cleanup and a test for a block rewriting bug.
llvm-svn: 96361
Diffstat (limited to 'clang/test/Rewriter/rewrite-block-pointer.mm')
-rw-r--r--clang/test/Rewriter/rewrite-block-pointer.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Rewriter/rewrite-block-pointer.mm b/clang/test/Rewriter/rewrite-block-pointer.mm
index b03b7a9dec0..9d07038bd27 100644
--- a/clang/test/Rewriter/rewrite-block-pointer.mm
+++ b/clang/test/Rewriter/rewrite-block-pointer.mm
@@ -2,6 +2,7 @@
// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
// radar 7638400
+// FIXME. Arrange this test's rewritten source to compile with clang
@interface X
@end
@@ -14,3 +15,16 @@ static void enumerateIt(void (^block)(id, id, char *)) {
@end
// CHECK-LP: static void enumerateIt(void (*)(id, id, char *));
+
+// radar 7651312
+void apply(void (^block)(int));
+
+static void x(int (^cmp)(int, int)) {
+ x(cmp);
+}
+
+static void y(int (^cmp)(int, int)) {
+ apply(^(int sect) {
+ x(cmp);
+ });
+}
OpenPOWER on IntegriCloud