blob: 2e3a826ce894264759b7a71c73b2db22e4329f38 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Douglas Gregorc5790df2009-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 McCallf786fb12009-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 McCall2d74de92009-12-01 22:10:20 +000021
22namespace 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}
Douglas Gregor4b4844f2010-01-29 17:15:43 +000032
33namespace PR6063 {
34 template <typename T> void f(T, T);
35
36 namespace detail
37 {
38 using PR6063::f;
39 }
40
41 template <typename T>
42 void g(T a, T b)
43 {
44 detail::f(a, b);
45 }
46}