aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/array-init.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-20 00:32:56 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-20 00:32:56 +0000
commita6457963cf7ffe71498c408dd590d9d1acb9513c (patch)
treec747c6a2675d10c3dfd9471828811a82386d85e5 /test/Sema/array-init.c
parent748d5d655d9df4e9f8b8ae93ecdd24d725cfb1b8 (diff)
Allow flexible array initializers that are not surrounded by
braces. We now build the appropriate fully-structured initializer list for such things. Per PR3618, verified that we're getting the right code generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/array-init.c')
-rw-r--r--test/Sema/array-init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index 4ee86181af..0c1bbc0470 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -201,8 +201,8 @@ int bar (void) {
return z.z;
}
struct s3 {void (*a)(void);} t5 = {autoStructTest};
-// Note that clang objc implementation depends on this extension.
-struct {int a; int b[];} t6 = {1, {1, 2, 3}};
+struct {int a; int b[];} t6 = {1, {1, 2, 3}}; // expected-warning{{flexible array initialization is a GNU extension}} \
+// expected-note{{initialized flexible array member 'b' is here}}
union {char a; int b;} t7[] = {1, 2, 3};
int t8[sizeof t7 == (3*sizeof(int)) ? 1 : -1];