diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-13 00:25:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-13 00:25:59 +0000 |
commit | 93dfdb1299ef740df854f4a745dc87e5e43f0c30 (patch) | |
tree | 9ee7596d57d124a8ca8c8760d03dcbdfdbdc3cf1 /lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 869e05406eae34a322e586b8b698e84f0f17db32 (diff) |
Semantic analysis for explicit instantiation of class templates. We
still aren't instantiating the definitions of class template members,
and core issues 275 and 259 will both affect the checking that we do
for explicit instantiations (but are not yet implemented).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 0fe6cee882..ce8cbe0f43 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -666,7 +666,8 @@ Sema::InstantiateBaseSpecifiers(CXXRecordDecl *Instantiation, bool Sema::InstantiateClass(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, - const TemplateArgumentList &TemplateArgs) { + const TemplateArgumentList &TemplateArgs, + bool ExplicitInstantiation) { bool Invalid = false; CXXRecordDecl *PatternDef @@ -678,8 +679,8 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, << Context.getTypeDeclType(Instantiation); Diag(Pattern->getLocation(), diag::note_member_of_template_here); } else { - Diag(PointOfInstantiation, - diag::err_template_implicit_instantiate_undefined) + Diag(PointOfInstantiation, diag::err_template_instantiate_undefined) + << ExplicitInstantiation << Context.getTypeDeclType(Instantiation); Diag(Pattern->getLocation(), diag::note_template_decl_here); } @@ -766,7 +767,8 @@ Sema::InstantiateClassTemplateSpecialization( return InstantiateClass(ClassTemplateSpec->getLocation(), ClassTemplateSpec, Pattern, - ClassTemplateSpec->getTemplateArgs()); + ClassTemplateSpec->getTemplateArgs(), + ExplicitInstantiation); } /// \brief Instantiate a nested-name-specifier. |