1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // expected-no-diagnostics 3 4 // PR4381 5 template<class T> struct X {}; 6 template<typename T> struct Y : public X<T>::X { }; 7 8 // PR4621 9 class A1 { A1(int x)10 A1(int x) {} 11 }; 12 template<class C> class B1 : public A1 { B1(C x)13 B1(C x) : A1(x.x) {} 14 }; 15 class A2 { A2(int x, int y); }; 16 template <class C> class B2 { 17 A2 x; B2(C x)18 B2(C x) : x(x.x, x.y) {} 19 }; 20 template <class C> class B3 { 21 C x; B3()22 B3() : x(1,2) {} 23 }; 24 25 // PR4627 26 template<typename _Container> class insert_iterator { 27 _Container* container; insert_iterator(_Container & __x)28 insert_iterator(_Container& __x) : container(&__x) {} 29 }; 30 31 // PR4763 32 template<typename T> struct s0 {}; 33 template<typename T> struct s0_traits {}; 34 template<typename T> struct s1 : s0<typename s0_traits<T>::t0> { s1s135 s1() {} 36 }; 37 38 // PR6062 39 namespace PR6062 { 40 template <typename T> 41 class A : public T::type 42 { A()43 A() : T::type() 44 { 45 } 46 47 template <typename U> A(U const & init)48 A(U const& init) 49 : T::type(init) 50 { } 51 52 template<typename U> A(U & init)53 A(U& init) : U::other_type(init) { } 54 }; 55 } 56 57 template<typename T, typename U> 58 struct X0 : T::template apply<U> { X0X059 X0(int i) : T::template apply<U>(i) { } 60 }; 61 62 // PR7698 63 namespace PR7698 { 64 template<typename Type> 65 class A { 66 char mA[sizeof(Type *)]; A()67 A(): mA() {} 68 }; 69 } 70