From: Reid Kleckner Date: Sat, 8 Jun 2013 18:51:21 +0000 (+0000) Subject: Add a test case for blocks taking an array typedef X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9808b711aa2153e4fe9a627a2721fa5c3bbbdc97;p=clang Add a test case for blocks taking an array typedef 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 --- diff --git a/test/Sema/block-args.c b/test/Sema/block-args.c index 5ee383eebb..c6beead391 100644 --- a/test/Sema/block-args.c +++ b/test/Sema/block-args.c @@ -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); +}