Eli Friedman | 59c0437 | 2009-07-29 19:44:27 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
Douglas Gregor | 42c39f3 | 2009-08-26 18:27:52 +0000 | [diff] [blame] | 3 | // PR4381 |
| 4 | template<class T> struct X {}; |
| 5 | template<typename T> struct Y : public X<T>::X { }; |
| 6 | |
Eli Friedman | 59c0437 | 2009-07-29 19:44:27 +0000 | [diff] [blame] | 7 | // PR4621 |
| 8 | class A1 { |
| 9 | A1(int x) {} |
| 10 | }; |
| 11 | template<class C> class B1 : public A1 { |
| 12 | B1(C x) : A1(x.x) {} |
| 13 | }; |
| 14 | class A2 { A2(int x, int y); }; |
| 15 | template <class C> class B2 { |
| 16 | A2 x; |
| 17 | B2(C x) : x(x.x, x.y) {} |
| 18 | }; |
| 19 | template <class C> class B3 { |
| 20 | C x; |
| 21 | B3() : x(1,2) {} |
| 22 | }; |
| 23 | |
| 24 | // PR4627 |
| 25 | template<typename _Container> class insert_iterator { |
| 26 | _Container* container; |
| 27 | insert_iterator(_Container& __x) : container(&__x) {} |
| 28 | }; |
| 29 | |
Fariborz Jahanian | 77a2b4f | 2009-08-24 17:19:23 +0000 | [diff] [blame] | 30 | // PR4763 |
| 31 | template<typename T> struct s0 {}; |
| 32 | template<typename T> struct s0_traits {}; |
| 33 | template<typename T> struct s1 : s0<typename s0_traits<T>::t0> { |
| 34 | s1() {} |
| 35 | }; |
| 36 | |