]> granicus.if.org Git - clang/commitdiff
Make sure to set the template specialization kind of an explicit
authorDouglas Gregor <dgregor@apple.com>
Thu, 8 Oct 2009 01:19:17 +0000 (01:19 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 8 Oct 2009 01:19:17 +0000 (01:19 +0000)
template instantiation of a member function of a class template.
FIXME -= 2;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83520 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/SemaTemplate/extern-templates.cpp

index 339a084d7afbab7b91509644b4ae6bcf81f2bfb0..9d3efa60b06861a12edc7e331c50c9971853c3c2 100644 (file)
@@ -3651,11 +3651,6 @@ Sema::DeclResult Sema::ActOnExplicitInstantiation(Scope *S,
       InstantiateFunctionDefinition(D.getIdentifierLoc(), Specialization, 
                                     false);
       
-    // FIXME: setTemplateSpecializationKind doesn't (yet) work for 
-    // non-templated member functions.
-    if (!Specialization->getPrimaryTemplate())
-      break;
-      
     Specialization->setTemplateSpecializationKind(TSK);
     break;
   }
index e0ffca9d2d12e9655b858f67eeb90e7971b21bb1..ee6600adc6a8937ed3a72021190ffc2bf028d904 100644 (file)
@@ -996,9 +996,9 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation,
                          Record->getInstantiatedFromMemberClass(),
                          TemplateArgs,
                          TSK);
-      else
-        InstantiateClassMembers(PointOfInstantiation, Record, TemplateArgs, 
-                                TSK);
+      
+      InstantiateClassMembers(PointOfInstantiation, Record, TemplateArgs, 
+                              TSK);
     }
   }
 }
index 7154c7e32f9cf039758608f93a17c885471cfc84..28fda1a11e6bb94ff852b466d70490eab472451f 100644 (file)
@@ -62,6 +62,5 @@ void g_X1(X1<void*> x1, void *ptr) {
 extern template void X1<const void*>::g(const void*);
 
 void g_X1_2(X1<const void *> x1, const void *ptr) {
-  // FIXME: This should not instantiate of x1<const void*>::g
-//  x1.g(ptr);
+  x1.g(ptr);
 }