[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / CXX / special / class.ctor / p1.cpp
blobe19dc8660707ccf366459edb2874aa34f9af8826
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 struct X0 {
4 struct type { };
6 X0();
7 X0(int);
8 (X0)(float);
9 X0 (f0)(int);
10 X0 (f0)(type);
12 X0 f1();
13 X0 f1(double);
16 X0::X0() { }
17 (X0::X0)(int) { }
19 X0 (X0::f0)(int) { return X0(); }
21 template<typename T>
22 struct X1 {
23 struct type { };
25 X1<T>();
26 X1<T>(int);
27 (X1<T>)(float);
28 X1(float, float);
29 (X1)(double);
30 X1<T> (f0)(int);
31 X1<T> (f0)(type);
32 X1 (f1)(int);
33 X1 (f1)(type);
35 template<typename U> X1(U);
36 X1 f2();
37 X1 f2(int);
40 template<typename T> X1<T>::X1() { }
41 template<typename T> (X1<T>::X1)(double) { }
42 template<typename T> X1<T> X1<T>::f1(int) { return 0; }
43 template<typename T> X1<T> (X1<T>::f1)(type) { return 0; }
45 class X2 {
46 X2::X2(); // expected-error {{extra qualification on member 'X2'}}
49 // We used to parse 'X3::X3' as a member function declaration.
50 // DR 1435 and DR 1310 made this invalid.
51 typedef int T1;
52 struct X3 {
53 X3::X3(T1()); // expected-error {{extra qualification on member 'X3'}}