[cfe-commits] r63262 - /cfe/trunk/test/Sema/designated-initializers.c
Douglas Gregor
dgregor at apple.com
Wed Jan 28 17:10:11 PST 2009
Author: dgregor
Date: Wed Jan 28 19:10:11 2009
New Revision: 63262
URL: http://llvm.org/viewvc/llvm-project?rev=63262&view=rev
Log:
Add another devilish testcase for designated initializers
Modified:
cfe/trunk/test/Sema/designated-initializers.c
Modified: cfe/trunk/test/Sema/designated-initializers.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/designated-initializers.c?rev=63262&r1=63261&r2=63262&view=diff
==============================================================================
--- cfe/trunk/test/Sema/designated-initializers.c (original)
+++ cfe/trunk/test/Sema/designated-initializers.c Wed Jan 28 19:10:11 2009
@@ -145,5 +145,10 @@
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
};
More information about the cfe-commits
mailing list