diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-29 01:10:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-29 01:10:11 +0000 |
commit | 58e22b19add744ff2094fbdc366a39709680c35d (patch) | |
tree | 805d80692f974eabf0d1a55ec4629cb3de03fc27 | |
parent | 9e80f7252ec1b91142e41790e4491c61e14b9472 (diff) |
Add another devilish testcase for designated initializers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63262 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Sema/designated-initializers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Sema/designated-initializers.c b/test/Sema/designated-initializers.c index 5c61faa667..efd0d40651 100644 --- a/test/Sema/designated-initializers.c +++ b/test/Sema/designated-initializers.c @@ -145,5 +145,10 @@ extern float global_float; struct XX { int a, *b; }; struct XY { int before; struct XX xx, *xp; float* after; } xy[] = { 0, 0, &xy[0].xx.a, &xy[0].xx, &global_float, - [1].xx = 0, &xy[1].xx.a, &xy[1].xx, &global_float + [1].xx = 0, &xy[1].xx.a, &xy[1].xx, &global_float, + 0, // expected-note{{previous initialization is here}} + 0, // expected-note{{previous initialization is here}} + [2].before = 0, // expected-warning{{initializer overrides prior initialization of this subobject}} + 0, // expected-warning{{initializer overrides prior initialization of this subobject}} + &xy[2].xx.a, &xy[2].xx, &global_float }; |