Refactor checking of the scope of explicit template specialization
declarations and explicit template instantiations, improving
diagnostics and making the code usable for function template
specializations (as well as class template specializations and partial
specializations).
llvm-svn: 83436
diff --git a/clang/test/SemaTemplate/class-template-spec.cpp b/clang/test/SemaTemplate/class-template-spec.cpp
index 34c616c..e4d917f 100644
--- a/clang/test/SemaTemplate/class-template-spec.cpp
+++ b/clang/test/SemaTemplate/class-template-spec.cpp
@@ -85,12 +85,12 @@
template<> struct N::B<int> { }; // okay
-template<> struct N::B<float> { }; // expected-error{{class template specialization of 'B' not in namespace 'N'}}
+template<> struct N::B<float> { }; // expected-error{{originally}}
namespace M {
template<> struct ::N::B<short> { }; // expected-error{{class template specialization of 'B' not in a namespace enclosing 'N'}}
- template<> struct ::A<long double>; // expected-error{{class template specialization of 'A' must occur in the global scope}}
+ template<> struct ::A<long double>; // expected-error{{originally}}
}
template<> struct N::B<char> {
diff --git a/clang/test/SemaTemplate/temp_class_spec_neg.cpp b/clang/test/SemaTemplate/temp_class_spec_neg.cpp
index b50bd8f..a029f47 100644
--- a/clang/test/SemaTemplate/temp_class_spec_neg.cpp
+++ b/clang/test/SemaTemplate/temp_class_spec_neg.cpp
@@ -9,7 +9,7 @@
}
template<typename T>
-struct N::M::A<T*> { }; // expected-error{{not in namespace}}
+struct N::M::A<T*> { }; // expected-error{{originally}}
// C++ [temp.class.spec]p9
// bullet 1
@@ -25,7 +25,7 @@
template< int X, int (*array_ptr)[X] > class A2 {}; // expected-note{{here}}
int array[5];
-template< int X > class A2<X,&array> { }; // expected-error{{specializes}}
+template< int X > class A2<X, &array> { }; // expected-error{{specializes}}
template<typename T, int N, template<typename X> class TT>
struct Test0;