]> granicus.if.org Git - clang/commitdiff
Add a test case for blocks taking an array typedef
authorReid Kleckner <reid@kleckner.net>
Sat, 8 Jun 2013 18:51:21 +0000 (18:51 +0000)
committerReid Kleckner <reid@kleckner.net>
Sat, 8 Jun 2013 18:51:21 +0000 (18:51 +0000)
r183614 was failing because va_list on some platforms is defined in a
similar manner.  This test fails on Windows with r183614 applied.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183617 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/block-args.c

index 5ee383eebb0241920bfd91e621bfa8d6b86079d0..c6beead3915b2b728e4f6a2de6b5afcab2b06b5c 100644 (file)
@@ -45,3 +45,14 @@ void test5_helper(void (^)(int, int[*]));
 void test5(void) {
   test5_helper(^(int n, int array[n]) {});
 }
+
+// Reduced from a problem on platforms where va_list is an array.
+struct tag {
+  int x;
+};
+typedef struct tag array_ty[1];
+void test6(void) {
+  void (^block)(array_ty) = ^(array_ty arr) { };
+  array_ty arr;
+  block(arr);
+}