Fixes a rewriter bug rewriting function decl.
with block-pointer-type as one or more of its
arguments. Fixes radar 7638400.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95992 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Rewriter/rewrite-block-pointer.mm b/test/Rewriter/rewrite-block-pointer.mm
new file mode 100644
index 0000000..b03b7a9
--- /dev/null
+++ b/test/Rewriter/rewrite-block-pointer.mm
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
+// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
+// radar 7638400
+
+@interface X
+@end
+
+void foo(void (^block)(int));
+
+@implementation X
+static void enumerateIt(void (^block)(id, id, char *)) {
+ foo(^(int idx) { });
+}
+@end
+
+// CHECK-LP: static void enumerateIt(void (*)(id, id, char *));