diff --git a/clang/include/clang/Sema/Template.h b/clang/include/clang/Sema/Template.h index af0c1e8506cf3..fe907078af275 100644 --- a/clang/include/clang/Sema/Template.h +++ b/clang/include/clang/Sema/Template.h @@ -587,16 +587,17 @@ enum class TemplateSubstitutionKind : char { /// specializations that will need to be instantiated after the /// enclosing class's instantiation is complete. SmallVector, 4> - OutOfLinePartialSpecs; + ClassTemplatePartialSpecializationDecl *>, + 1> + OutOfLinePartialSpecs; /// A list of out-of-line variable template partial /// specializations that will need to be instantiated after the /// enclosing variable's instantiation is complete. /// FIXME: Verify that this is needed. SmallVector< - std::pair, 4> - OutOfLineVarPartialSpecs; + std::pair, 1> + OutOfLineVarPartialSpecs; public: TemplateDeclInstantiator(Sema &SemaRef, DeclContext *Owner, diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index bcad815e1587f..7da09b149446a 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2394,7 +2394,7 @@ Decl *TemplateDeclInstantiator::VisitVarTemplateDecl(VarTemplateDecl *D) { // Queue up any out-of-line partial specializations of this member // variable template; the client will force their instantiation once // the enclosing class has been instantiated. - SmallVector PartialSpecs; + SmallVector PartialSpecs; D->getPartialSpecializations(PartialSpecs); for (unsigned I = 0, N = PartialSpecs.size(); I != N; ++I) if (PartialSpecs[I]->getFirstDecl()->isOutOfLine())