aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-07 23:56:10 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-07 23:56:10 +0000
commit2db323294ac02296125e1e0beb4c3595992e75bb (patch)
tree2fea63628d38b674cc418a164d002b1f1861bb7d /lib/Sema/SemaTemplate.cpp
parente3af0235ce6548e221e04c2ae5aeb0fb413ba736 (diff)
Keep track of whether a member function instantiated from a member
function of a class template was implicitly instantiated, explicitly instantiated (declaration or definition), or explicitly specialized. The same MemberSpecializationInfo structure will be used for static data members and member classes as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83509 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index f3cd2e41fb..339a084d7a 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -3171,10 +3171,13 @@ Sema::CheckMemberFunctionSpecialization(CXXMethodDecl *FD,
Instantiation, FD->getLocation(),
false, TSK_ExplicitSpecialization))
return true;
+
+ // FIXME: Check for specialization-after-instantiation errors and such.
- // FIXME: Mark the new declaration as a member function specialization.
- // We may also want to mark the original instantiation as having been
- // explicitly specialized.
+ // Note that this function is an explicit instantiation of a member function.
+ Instantiation->setTemplateSpecializationKind(TSK_ExplicitSpecialization);
+ FD->setInstantiationOfMemberFunction(FunctionInTemplate,
+ TSK_ExplicitSpecialization);
// Save the caller the trouble of having to figure out which declaration
// this specialization matches.