From 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Mon, 2 May 2011 19:39:53 +0000
Subject: Vendor import of clang trunk r130700:
 http://llvm.org/svn/llvm-project/cfe/trunk@130700

---
 test/SemaTemplate/nested-name-spec-template.cpp | 41 +++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

(limited to 'test/SemaTemplate/nested-name-spec-template.cpp')

diff --git a/test/SemaTemplate/nested-name-spec-template.cpp b/test/SemaTemplate/nested-name-spec-template.cpp
index 9c72845..635687d 100644
--- a/test/SemaTemplate/nested-name-spec-template.cpp
+++ b/test/SemaTemplate/nested-name-spec-template.cpp
@@ -99,3 +99,44 @@ namespace PR7725 {
     }
   };
 }
+
+namespace PR9226 {
+  template<typename a>
+  void nt() // expected-note{{function template 'nt' declared here}}
+  { nt<>:: } // expected-error{{qualified name refers into a specialization of function template 'nt'}} \
+  // expected-error{{expected unqualified-id}}
+
+  template<typename T>
+  void f(T*); // expected-note{{function template 'f' declared here}}
+
+  template<typename T>
+  void f(T*, T*); // expected-note{{function template 'f' declared here}}
+
+  void g() {
+    f<int>:: // expected-error{{qualified name refers into a specialization of function template 'f'}}
+  } // expected-error{{expected unqualified-id}}
+
+  struct X {
+    template<typename T> void f(); // expected-note{{function template 'f' declared here}}
+  };
+
+  template<typename T, typename U>
+  struct Y {
+    typedef typename T::template f<U> type; // expected-error{{template name refers to non-type template 'X::f'}}
+  };
+
+  Y<X, int> yxi; // expected-note{{in instantiation of template class 'PR9226::Y<PR9226::X, int>' requested here}}
+}
+
+namespace PR9449 {
+  template <typename T>
+  struct s; // expected-note{{template is declared here}}
+
+  template <typename T>
+  void f() {
+    int s<T>::template n<T>::* f; // expected-error{{implicit instantiation of undefined template 'PR9449::s<int>'}} \
+    // expected-error{{following the 'template' keyword}}
+  }
+
+  template void f<int>(); // expected-note{{in instantiation of}}
+}
-- 
cgit v1.1