summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-02-24 00:00:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-02-24 00:00:58 +0000
commitb7a9bedfcda215bf317147e81939dd57902c6da7 (patch)
tree4e8b3ad05577250ba5d23f6ded418765ae4c3c1a
parente8f1ffb50a203c3b2e1f5bb94f493ecb381a43fa (diff)
downloadbcm5719-llvm-b7a9bedfcda215bf317147e81939dd57902c6da7.tar.gz
bcm5719-llvm-b7a9bedfcda215bf317147e81939dd57902c6da7.zip
Add another test for PR36157.
llvm-svn: 325998
-rw-r--r--clang/test/Sema/vla.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/vla.c b/clang/test/Sema/vla.c
index b9576bf8cfd..c962749d067 100644
--- a/clang/test/Sema/vla.c
+++ b/clang/test/Sema/vla.c
@@ -68,3 +68,11 @@ void pr23151(int (*p1)[*]) // expected-error {{variable length array must be bou
int TransformBug(int a) {
return sizeof(*(int(*)[({ goto v; v: a;})]) 0); // expected-warning {{use of GNU statement expression extension}}
}
+
+// PR36157
+struct {
+ int a[ // expected-error {{variable length array in struct}}
+ implicitly_declared() // expected-warning {{implicit declaration}}
+ ];
+};
+int (*use_implicitly_declared)() = implicitly_declared; // ok, was implicitly declared at file scope
OpenPOWER on IntegriCloud