From 9808b711aa2153e4fe9a627a2721fa5c3bbbdc97 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Sat, 8 Jun 2013 18:51:21 +0000 Subject: [PATCH] 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 --- test/Sema/block-args.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); +} -- 2.40.0