diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-24 05:34:41 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-24 05:34:41 +0000 |
commit | 26d6e9d56527b6b52c44b892aed3171a27d98eb6 (patch) | |
tree | 1598a0577124b51f5c26e1839f4b030e0a53272a /lib/Sema/SemaTemplate.cpp | |
parent | 043097507f99b1156bfd8bad41e7d5166ae4b9b6 (diff) |
Set the template specialization kind before instantiating the function definition so that the function will have the right linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index bfdf17afae..a37a73119d 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -4347,12 +4347,12 @@ Sema::DeclResult Sema::ActOnExplicitInstantiation(Scope *S, if (SuppressNew) return DeclPtrTy(); } + + Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc()); if (TSK == TSK_ExplicitInstantiationDefinition) InstantiateFunctionDefinition(D.getIdentifierLoc(), Specialization, false, /*DefinitionRequired=*/true); - - Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc()); // C++0x [temp.explicit]p2: // If the explicit instantiation is for a member function, a member class |