From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaTemplate/qualified-id.cpp | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 clang/test/SemaTemplate/qualified-id.cpp (limited to 'clang/test/SemaTemplate/qualified-id.cpp') diff --git a/clang/test/SemaTemplate/qualified-id.cpp b/clang/test/SemaTemplate/qualified-id.cpp new file mode 100644 index 0000000..64dff1c --- /dev/null +++ b/clang/test/SemaTemplate/qualified-id.cpp @@ -0,0 +1,56 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR5061 +namespace a { + template class C {}; +} +namespace b { + template void f0(a::C &a0) { } +} + + +namespace test1 { + int a = 0; + template class Base { }; + template class Derived : public Base { + int foo() { + return test1::a; + } + }; +} + +namespace test2 { + class Impl { + public: + int foo(); + }; + template class Magic : public Impl { + int foo() { + return Impl::foo(); + } + }; +} + +namespace PR6063 { + template void f(T, T); + + namespace detail + { + using PR6063::f; + } + + template + void g(T a, T b) + { + detail::f(a, b); + } +} + +namespace PR12291 { + template + class Outer2 { + template + template + class Outer2::Inner; // expected-error{{nested name specifier 'Outer2::' for declaration does not refer into a class, class template or class template partial specialization}} + }; +} -- cgit v1.2.3