Add Sema checking for __block on vm declarations. Radar 6441502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70601 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c
index 397d3e5..6786f4d 100644
--- a/test/Sema/block-misc.c
+++ b/test/Sema/block-misc.c
@@ -150,7 +150,9 @@
__block int test16i; // expected-error {{__block attribute not allowed, only allowed on local variables}}
void test16(__block int i) { // expected-error {{__block attribute not allowed, only allowed on local variables}}
+ int size = 5;
extern __block double extern_var; // expected-error {{__block attribute not allowed, only allowed on local variables}}
static __block char * pch; // expected-error {{__block attribute not allowed, only allowed on local variables}}
+ __block int a[size]; // expected-error {{__block attribute not allowed on declaration with a variably modified type}}
+ __block int (*ap)[size]; // expected-error {{__block attribute not allowed on declaration with a variably modified type}}
}
-