blob: 29eab89d84f557b83ee79ad7daf0f7fd719ea7b5 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Douglas Gregor9d7b3532009-09-28 07:26:33 +00002
3// PR5061
4namespace a {
5 template <typename T> class C {};
6}
7namespace b {
8 template<typename T> void f0(a::C<T> &a0) { }
9}
John McCalle1599ce2009-11-30 23:50:49 +000010
11
12namespace 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 McCallaa81e162009-12-01 22:10:20 +000021
22namespace test2 {
23 class Impl {
John McCall7002f4c2010-04-09 19:03:51 +000024 public:
John McCallaa81e162009-12-01 22:10:20 +000025 int foo();
26 };
27 template <class T> class Magic : public Impl {
28 int foo() {
29 return Impl::foo();
30 }
31 };
32}
Douglas Gregor86b8e092010-01-29 17:15:43 +000033
34namespace PR6063 {
35 template <typename T> void f(T, T);
36
37 namespace detail
38 {
39 using PR6063::f;
40 }
41
42 template <typename T>
43 void g(T a, T b)
44 {
45 detail::f(a, b);
46 }
47}