1 | // RUN: %clang_cc1 %s -std=c++1z -fsyntax-only -verify -Winitializer-overrides |
---|---|
2 | // expected-no-diagnostics |
3 | |
4 | struct B { |
5 | int x; |
6 | }; |
7 | |
8 | struct D : B { |
9 | int y; |
10 | }; |
11 | |
12 | void test() { D d = {1, .y = 2}; } |
13 |
1 | // RUN: %clang_cc1 %s -std=c++1z -fsyntax-only -verify -Winitializer-overrides |
---|---|
2 | // expected-no-diagnostics |
3 | |
4 | struct B { |
5 | int x; |
6 | }; |
7 | |
8 | struct D : B { |
9 | int y; |
10 | }; |
11 | |
12 | void test() { D d = {1, .y = 2}; } |
13 |