[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CXX / special / class.init / class.inhctor.init / p2.cpp
blob7ea2ccc3605f4cb12184d9cd0228816b12883610
1 // RUN: %clang_cc1 -std=c++11 -verify %s
3 namespace std_example {
4 struct A { A(int); };
5 struct B : A { using A::A; };
7 struct C1 : B { using B::B; };
8 struct C2 : B { using B::B; };
10 struct D1 : C1, C2 {
11 using C1::C1; // expected-note {{inherited from base class 'C1' here}}
12 using C2::C2; // expected-note {{inherited from base class 'C2' here}}
15 struct V1 : virtual B { using B::B; };
16 struct V2 : virtual B { using B::B; };
18 struct D2 : V1, V2 {
19 using V1::V1;
20 using V2::V2;
23 D1 d1(0); // expected-error {{constructor of 'A' inherited from multiple base class subobjects}}
24 D2 d2(0); // OK: initializes virtual B base class, which initializes the A base class
25 // then initializes the V1 and V2 base classes as if by a defaulted default constructor
27 struct M { M(); M(int); };
28 struct N : M { using M::M; };
29 struct O : M {};
30 struct P : N, O { using N::N; using O::O; };
31 P p(0); // OK: use M(0) to initialize N's base class,
32 // use M() to initialize O's base class