r325998 - Add another test for PR36157.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 23 16:00:58 PST 2018
Author: rsmith
Date: Fri Feb 23 16:00:58 2018
New Revision: 325998
URL: http://llvm.org/viewvc/llvm-project?rev=325998&view=rev
Log:
Add another test for PR36157.
Modified:
cfe/trunk/test/Sema/vla.c
Modified: cfe/trunk/test/Sema/vla.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/vla.c?rev=325998&r1=325997&r2=325998&view=diff
==============================================================================
--- cfe/trunk/test/Sema/vla.c (original)
+++ cfe/trunk/test/Sema/vla.c Fri Feb 23 16:00:58 2018
@@ -68,3 +68,11 @@ void pr23151(int (*p1)[*]) // expected-e
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
More information about the cfe-commits
mailing list