Douglas Gregor | 9d7b353 | 2009-09-28 07:26:33 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | // PR5061 |
| 4 | namespace a { |
| 5 | template <typename T> class C {}; |
| 6 | } |
| 7 | namespace b { |
| 8 | template<typename T> void f0(a::C<T> &a0) { } |
| 9 | } |
John McCall | e1599ce | 2009-11-30 23:50:49 +0000 | [diff] [blame] | 10 | |
| 11 | |
| 12 | namespace test1 { |
| 13 | int a = 0; |
| 14 | template <class T> class Base { }; |
| 15 | template <class T> class Derived : public Base<T> { |
| 16 | int foo() { |
| 17 | return test1::a; |
| 18 | } |
| 19 | }; |
| 20 | } |
John McCall | aa81e16 | 2009-12-01 22:10:20 +0000 | [diff] [blame] | 21 | |
| 22 | namespace test2 { |
| 23 | class Impl { |
| 24 | int foo(); |
| 25 | }; |
| 26 | template <class T> class Magic : public Impl { |
| 27 | int foo() { |
| 28 | return Impl::foo(); |
| 29 | } |
| 30 | }; |
| 31 | } |