summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2010-01-05 03:10:36 +0000
committerMike Stump <mrs@apple.com>2010-01-05 03:10:36 +0000
commit8971a865384769750ed497280a1e2f1ede3fcfd9 (patch)
tree9f704622a089b91c0002ab43a1a4811a1c754b65 /clang/test
parent7dafa0d0481049cf71501d3cf36b6785b78a4e31 (diff)
downloadbcm5719-llvm-8971a865384769750ed497280a1e2f1ede3fcfd9.tar.gz
bcm5719-llvm-8971a865384769750ed497280a1e2f1ede3fcfd9.zip
Disallow captured arrays in blocks as well. Radar 7438948.
llvm-svn: 92677
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/block-misc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/block-misc.c b/clang/test/Sema/block-misc.c
index bc30552302e..4179eda5e75 100644
--- a/clang/test/Sema/block-misc.c
+++ b/clang/test/Sema/block-misc.c
@@ -208,3 +208,11 @@ void test20() {
(void)(vm+1); // expected-error {{cannot refer to declaration with a variably modified type inside block}}
}();
}
+
+void test21() {
+ int a[7]; // expected-note {{declared at}}
+ a[1] = 1;
+ ^{
+ (void)a[1]; // expected-error {{cannot refer to declaration with an array type inside block}}
+ }();
+}
OpenPOWER on IntegriCloud