diff options
Diffstat (limited to 'clang/test/Sema/designated-initializers.c')
-rw-r--r-- | clang/test/Sema/designated-initializers.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/Sema/designated-initializers.c b/clang/test/Sema/designated-initializers.c index 0a72e8ff379..4239b5e6aeb 100644 --- a/clang/test/Sema/designated-initializers.c +++ b/clang/test/Sema/designated-initializers.c @@ -130,10 +130,10 @@ int get8() { ++counter; return 8; } void test() { struct X xs[] = { [0] = (struct X){1, 2}, // expected-note 2 {{previous initialization is here}} - [0].c = 3, // expected-warning{{subobject initialization overrides initialization of other fields within its enclosing subobject}} + [0].c = 3, // expected-warning{{initializer partially overrides prior initialization of this subobject}} (struct X) {4, 5, 6}, // expected-note{{previous initialization is here}} - [1].b = get8(), // expected-warning{{subobject initialization overrides initialization of other fields within its enclosing subobject}} - [0].b = 8 // expected-warning{{subobject initialization overrides initialization of other fields within its enclosing subobject}} + [1].b = get8(), // expected-warning{{initializer partially overrides prior initialization of this subobject}} + [0].b = 8 // expected-warning{{initializer partially overrides prior initialization of this subobject}} }; } @@ -331,20 +331,20 @@ struct overwrite_string_struct { char L[6]; int M; } overwrite_string[] = { - { { "foo" }, 1 }, // expected-note {{previous initialization is here}} - [0].L[2] = 'x' // expected-warning{{subobject initialization overrides initialization of other fields}} + { { "foo" }, 1 }, // expected-note{{previous initialization is here}} + [0].L[2] = 'x' // expected-warning{{initializer partially overrides prior initialization of this subobject}} }; struct overwrite_string_struct2 { char L[6]; int M; } overwrite_string2[] = { { { "foo" }, 1 }, // expected-note{{previous initialization is here}} - [0].L[4] = 'x' // expected-warning{{subobject initialization overrides initialization of other fields}} + [0].L[4] = 'x' // expected-warning{{initializer partially overrides prior initialization of this subobject}} }; struct overwrite_string_struct overwrite_string3[] = { "foo", 1, // expected-note{{previous initialization is here}} - [0].L[4] = 'x' // expected-warning{{subobject initialization overrides initialization of other fields}} + [0].L[4] = 'x' // expected-warning{{initializer partially overrides prior initialization of this subobject}} }; struct overwrite_string_struct overwrite_string4[] = { |