Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.
This change also introduces the injected-class-name into a class
template specialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 42b0205..ad7aa3b 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1784,8 +1784,7 @@
/// \brief The kind of template instantiation we are performing
enum {
/// We are instantiating a template declaration. The entity is
- /// the declaration we're instantiation (e.g., a
- /// ClassTemplateSpecializationDecl).
+ /// the declaration we're instantiation (e.g., a CXXRecordDecl).
TemplateInstantiation,
/// We are instantiating a default argument for a template
@@ -1870,7 +1869,7 @@
struct InstantiatingTemplate {
/// \brief Note that we are instantiating a class template.
InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
- ClassTemplateSpecializationDecl *Entity,
+ CXXRecordDecl *Entity,
SourceRange InstantiationRange = SourceRange());
/// \brief Note that we are instantiating a default argument in a
@@ -1915,8 +1914,17 @@
unsigned NumTemplateArgs);
bool
- InstantiateBaseSpecifiers(ClassTemplateSpecializationDecl *ClassTemplateSpec,
- ClassTemplateDecl *ClassTemplate);
+ InstantiateBaseSpecifiers(CXXRecordDecl *Instantiation,
+ CXXRecordDecl *Pattern,
+ const TemplateArgument *TemplateArgs,
+ unsigned NumTemplateArgs);
+
+ bool
+ InstantiateClass(SourceLocation PointOfInstantiation,
+ CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern,
+ const TemplateArgument *TemplateArgs,
+ unsigned NumTemplateArgs);
+
bool
InstantiateClassTemplateSpecialization(
ClassTemplateSpecializationDecl *ClassTemplateSpec,