Improve location information on "reused" class template specialization
decls. Test and document the semantic location of class template
specialization definitions that occur within a scope enclosing the
scope of the class template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65478 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/class-template-spec.cpp b/test/SemaTemplate/class-template-spec.cpp
index 4ae1b9b..15c797a 100644
--- a/test/SemaTemplate/class-template-spec.cpp
+++ b/test/SemaTemplate/class-template-spec.cpp
@@ -52,8 +52,11 @@
 namespace N {
   template<typename T> struct B; // expected-note 2{{template is declared here}}
 
+  template<> struct ::N::B<char>; // okay
   template<> struct ::N::B<short>; // okay
   template<> struct ::N::B<int>; // okay
+
+  int f(int);
 }
 
 template<> struct N::B<int> { }; // okay
@@ -65,3 +68,7 @@
 
   template<> struct ::A<long double>; // expected-error{{class template specialization of 'A' must occur in the global scope}}
 }
+
+template<> struct N::B<char> { 
+  int testf(int x) { return f(x); }
+};