[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / SemaTemplate / qualified-id.cpp
blob883d3d330d148209574d3545b304b73fd32c33bc
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR5061
4 namespace a {
5 template <typename T> class C {};
7 namespace b {
8 template<typename T> void f0(a::C<T> &a0) { }
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;
22 namespace test2 {
23 class Impl {
24 public:
25 int foo();
27 template <class T> class Magic : public Impl {
28 int foo() {
29 return Impl::foo();
34 namespace PR6063 {
35 template <typename T> void f(T, T);
37 namespace detail
39 using PR6063::f;
42 template <typename T>
43 void g(T a, T b)
45 detail::f(a, b);
49 namespace PR12291 {
50 template <typename T>
51 class Outer2 {
52 template <typename V>
53 template <typename W>
54 class Outer2<V>::Inner; // expected-error{{nested name specifier 'Outer2<V>::' for declaration does not refer into a class, class template or class template partial specialization}}
55 // expected-error@-1{{forward declaration of class cannot have a nested name specifier}}