aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Sema/SemaTemplate.cpp3
-rw-r--r--test/SemaTemplate/instantiate-member-template.cpp9
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index d72cea0907..fb25e99bc8 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -808,9 +808,6 @@ Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc,
const CXXScopeSpec &SS,
TemplateParameterList **ParamLists,
unsigned NumParamLists) {
- // FIXME: This routine will need a lot more testing once we have support for
- // member templates.
-
// Find the template-ids that occur within the nested-name-specifier. These
// template-ids will match up with the template parameter lists.
llvm::SmallVector<const TemplateSpecializationType *, 4>
diff --git a/test/SemaTemplate/instantiate-member-template.cpp b/test/SemaTemplate/instantiate-member-template.cpp
index ebc3a5293f..36f3b6fd49 100644
--- a/test/SemaTemplate/instantiate-member-template.cpp
+++ b/test/SemaTemplate/instantiate-member-template.cpp
@@ -63,10 +63,16 @@ template<typename U>
struct X1<T>::Inner4 {
template<typename V>
V f2(T t, U u, V);
+
+ static U value;
};
template<typename T>
template<typename U>
+U X1<T>::Inner4<U>::value; // expected-error{{reference variable}}
+
+template<typename T>
+template<typename U>
template<typename V>
V X1<T>::Inner4<U>::f2(T t, U u, V) {
return t + u; // expected-error{{incompatible type}}
@@ -93,4 +99,7 @@ void test_X1(int *ip, int i, double *dp) {
X1<int*>::Inner4<int> id4;
id4.f2(ip, i, dp); // expected-note{{instantiation}}
+
+ X1<int*>::Inner4<int>::value = 17;
+ i = X1<int*>::Inner4<int&>::value; // expected-note{{instantiation}}
}