r183617 - Add a test case for blocks taking an array typedef
Reid Kleckner
reid at kleckner.net
Sat Jun 8 11:51:22 PDT 2013
Author: rnk
Date: Sat Jun 8 13:51:21 2013
New Revision: 183617
URL: http://llvm.org/viewvc/llvm-project?rev=183617&view=rev
Log:
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.
Modified:
cfe/trunk/test/Sema/block-args.c
Modified: cfe/trunk/test/Sema/block-args.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/block-args.c?rev=183617&r1=183616&r2=183617&view=diff
==============================================================================
--- cfe/trunk/test/Sema/block-args.c (original)
+++ cfe/trunk/test/Sema/block-args.c Sat Jun 8 13:51:21 2013
@@ -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);
+}
More information about the cfe-commits
mailing list