[OpenACC] Create AST nodes for 'data' constructs
[llvm-project.git] / clang / test / CXX / special / class.inhctor / p1.cpp
blobd116a3a561d8596ffdca9f062f17a20691ebb042
1 // RUN: %clang_cc1 -std=c++11 -verify %s
2 //
3 // Note: [class.inhctor] was removed by P0136R1. This tests the new behavior
4 // for the wording that used to be there.
6 struct A {
7 A(...); // expected-note {{candidate constructor}}
8 A(int = 0, int = 0, int = 0, int = 0, ...); // expected-note 3{{candidate constructor}} expected-note 2{{candidate inherited constructor}}
9 A(int = 0, int = 0, ...); // expected-note 3{{candidate constructor}} expected-note 2{{candidate inherited constructor}}
11 template<typename T> A(T, int = 0, ...);
13 template<typename T, int N> A(const T (&)[N]); // expected-note {{candidate constructor}} expected-note {{candidate inherited constructor}}
14 template<typename T, int N> A(const T (&)[N], int = 0); // expected-note {{candidate constructor}} expected-note {{candidate inherited constructor}}
17 struct B : A { // expected-note {{because base class 'A' has multiple default constructors}}
18 using A::A; // expected-note 6{{inherited here}}
19 B(void*);
22 struct C {} c;
24 A a0{}; // expected-error {{ambiguous}}
25 B b0{}; // expected-error {{deleted}}
27 A a1{1}; // expected-error {{ambiguous}}
28 B b1{1}; // expected-error {{ambiguous}}
30 A a2{1,2}; // expected-error {{ambiguous}}
31 B b2{1,2}; // expected-error {{ambiguous}}
33 A a3{1,2,3}; // ok
34 B b3{1,2,3}; // ok
36 A a4{1,2,3,4}; // ok
37 B b4{1,2,3,4}; // ok
39 A a5{1,2,3,4,5}; // ok
40 B b5{1,2,3,4,5}; // ok
42 A a6{c}; // ok
43 B b6{c}; // ok
45 A a7{c,0}; // ok
46 B b7{c,0}; // ok
48 A a8{c,0,1}; // ok
49 B b8{c,0,1}; // ok
51 A a9{"foo"}; // expected-error {{ambiguous}}
52 B b9{"foo"}; // expected-error {{ambiguous}}
54 namespace PR15755 {
55 struct X {
56 template<typename...Ts> X(int, Ts...);
58 struct Y : X {
59 using X::X;
61 struct Z : Y {
62 using Y::Y;
64 Z z(0);