diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-10-07 23:56:10 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-10-07 23:56:10 +0000 |
commit | d801b06232cd252c00e25363fbfcc2a74896b6e9 (patch) | |
tree | b30fb8f0d4cfbe10af1d4db6f3124dbe45885b2a /clang/lib/Sema/SemaTemplate.cpp | |
parent | 32cc4ec304a112344a006ff35f01657dda1f5aa3 (diff) | |
download | bcm5719-llvm-d801b06232cd252c00e25363fbfcc2a74896b6e9.tar.gz bcm5719-llvm-d801b06232cd252c00e25363fbfcc2a74896b6e9.zip |
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.
llvm-svn: 83509
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index f3cd2e41fbd..339a084d7af 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/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. |