diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-29 22:49:33 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-29 22:49:33 +0000 |
| commit | 33e9be6c8b5aad9c164e082c7e78cc08dd13cac1 (patch) | |
| tree | e926a08875c477003a17fc3fa85c24ecbc6bc12a /clang/test | |
| parent | 8823dbc552ec6946027c59ac53510404b98671b6 (diff) | |
| download | bcm5719-llvm-33e9be6c8b5aad9c164e082c7e78cc08dd13cac1.tar.gz bcm5719-llvm-33e9be6c8b5aad9c164e082c7e78cc08dd13cac1.zip | |
Refactor InitListChecker to check only a single (explicit) initializer
list, rather than recursively checking multiple lists in C.
This simplification is in preparation for making InitListChecker
maintain more state that's specific to the explicit initializer list,
particularly when handling designated initialization.
llvm-svn: 370418
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/designated-initializers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Sema/designated-initializers.c b/clang/test/Sema/designated-initializers.c index 43f3318824d..0a72e8ff379 100644 --- a/clang/test/Sema/designated-initializers.c +++ b/clang/test/Sema/designated-initializers.c @@ -46,7 +46,7 @@ struct point array[10] = { struct point array2[10] = { [10].x = 2.0, // expected-error{{array designator index (10) exceeds array bounds (10)}} [4 ... 5].y = 2.0, // expected-note 2 {{previous initialization is here}} - [4 ... 6] = { .x = 3, .y = 4.0 } // expected-warning 2 {{subobject initialization overrides initialization of other fields within its enclosing subobject}} + [4 ... 6] = { .x = 3, .y = 4.0 } // expected-warning 2 {{initializer overrides prior initialization of this subobject}} }; struct point array3[10] = { @@ -364,7 +364,7 @@ struct { }, .u1 = { - .a = 0, - .b = 0, + .a = 0, // expected-note {{previous initialization is here}} + .b = 0, // expected-warning {{initializer overrides prior initialization of this subobject}} }, }; |

