diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-03-20 00:32:56 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-03-20 00:32:56 +0000 |
| commit | 07d8e3a500477fef5164f928b6b9cec45580ccef (patch) | |
| tree | 463b180b52cde4acb0b44fcbb984b6678eab0ce1 /clang/test/Sema/array-init.c | |
| parent | a1a0e4b27e80e11cb87fc5e41492c946ba5b068e (diff) | |
| download | bcm5719-llvm-07d8e3a500477fef5164f928b6b9cec45580ccef.tar.gz bcm5719-llvm-07d8e3a500477fef5164f928b6b9cec45580ccef.zip | |
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.
llvm-svn: 67353
Diffstat (limited to 'clang/test/Sema/array-init.c')
| -rw-r--r-- | clang/test/Sema/array-init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c index 4ee86181afe..0c1bbc04709 100644 --- a/clang/test/Sema/array-init.c +++ b/clang/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]; |

