Lines Matching refs:Specialization
60 // refers to the specified class template specialization,
61 // which could be the current specialization or another
62 // specialization.
96 // template itself and not a specialization thereof, and is not
866 // class template partial specialization, or class template specialization.
923 // In a redeclaration, partial specialization, explicit
924 // specialization or explicit instantiation of a class template,
1007 // If we are providing an explicit specialization of a member that is a
1499 /// declared is an explicit specialization, false otherwise.
1505 /// template specialization), or may be NULL (if what we're declaring isn't
1532 // If we found an explicit specialization that prevents us from needing
1534 // explicit specialization.
1542 // If this type is an explicit specialization, we're done.
1574 // Look one step prior in a dependent template specialization type.
1615 specialization for
1637 // class templates. In an explicit specialization for such a member, the
1682 // In an explicit specialization declaration for a member of a class
1703 // here, then it's an explicit specialization.
1802 // If there was a specialization somewhere, such that 'template<>' is
1804 // specialization occurred.
1818 // In an explicit specialization declaration for a member of a class
1879 // build a template specialization type for it.
1904 // Find the canonical type for this type alias template specialization.
1928 // This class template specialization is a dependent
1930 // specialization type that contains all of the converted
1985 // Find the class template specialization declaration that
1993 // specialization. Create the canonical declaration and add it to
2009 "type of non-dependent specialization is not a RecordType");
2013 // specialization, which refers back to the class template
2014 // specialization we created or found.
2124 // resolves to an alias template specialization, the
2150 // Provide source-location information for the template specialization.
4415 /// \brief Determine what kind of template specialization the given declaration
4431 /// \brief Check whether a specialization is well-formed in the current
4434 /// This routine determines whether a template specialization can be declared
4447 /// \param Loc the location of the explicit specialization or instantiation of
4450 /// \param IsPartialSpecialization whether this is a partial specialization of
4480 // An explicit specialization shall be declared in the namespace
4483 // template is a member. An explicit specialization of a member
4488 // specialization may be defined later in the name- space in which
4489 // the explicit specialization was declared, or in a namespace
4490 // that encloses the one in which the explicit specialization was
4505 // A class template partial specialization may be declared or redeclared
4516 // An explicit specialization shall be declared in the namespace of which
4519 // An explicit specialization of a member function, member class or
4524 // An explicit specialization shall be declared in a namespace enclosing
4568 // FIXME: check for specialization-after-instantiation errors and such.
4574 /// that checks non-type template partial specialization arguments.
4616 // specialization, the following restrictions apply:
4619 // specialization except when the argument expression is a
4630 // parameter of the specialization.
4645 /// partial specialization according to C++ [temp.class.spec]p9.
4651 /// partial specialization.
4751 // The template parameter list of a specialization shall not
4794 // Check that the specialization uses the same tag kind as the
4832 // Find the class template (partial) specialization declaration that
4866 ClassTemplateSpecializationDecl *Specialization = 0;
4868 // Check whether we can declare a class template specialization in
4881 // Since the only prior class template specialization with these
4883 // referencing this specialization as a friend, reuse that
4886 Specialization = PrevDecl;
4887 Specialization->setLocation(TemplateNameLoc);
4889 Specialization->setTemplateParameterListsInfo(Context,
4894 CanonType = Context.getTypeDeclType(Specialization);
4897 // arguments of the class template partial specialization.
4907 // -- The argument list of the specialization shall not be identical
4922 // Create a new class template partial specialization declaration node.
4948 Specialization = Partial;
4950 // If we are providing an explicit specialization of a member class
4951 // template specialization, make a note of that.
4956 // partial specialization are deducible from the template
4957 // arguments. If not, this class template partial specialization
4988 // Create a new class template specialization declaration node for
4989 // this explicit specialization or friend declaration.
4990 Specialization
4998 SetNestedNameSpecifier(Specialization, SS);
5000 Specialization->setTemplateParameterListsInfo(Context,
5006 ClassTemplate->AddSpecialization(Specialization, InsertPos);
5008 CanonType = Context.getTypeDeclType(Specialization);
5013 // explicitly specialized then that specialization shall be declared
5014 // before the first use of that specialization that would cause an implicit
5020 // Is there any previous explicit specialization declaration?
5030 << Context.getTypeDeclType(Specialization) << Range;
5040 // If this is not a friend, note that this is an explicit specialization.
5042 Specialization->setSpecializationKind(TSK_ExplicitSpecialization);
5044 // Check that this isn't a redefinition of this specialization.
5046 if (RecordDecl *Def = Specialization->getDefinition()) {
5049 << Context.getTypeDeclType(Specialization) << Range;
5051 Specialization->setInvalidDecl();
5057 ProcessDeclAttributeList(S, Specialization, Attr);
5060 // specialization as the user wrote in the specialization
5062 // from the specialization's declaration the way that the user
5063 // actually wrote the specialization, rather than formatting the
5065 // template arguments in the specialization.
5070 Specialization->setTypeAsWritten(WrittenTy);
5071 Specialization->setTemplateKeywordLoc(TemplateKWLoc);
5076 // A template explicit specialization is in the scope of the
5083 Specialization->setLexicalDeclContext(CurContext);
5085 // We may be starting the definition of this specialization.
5087 Specialization->startDefinition();
5097 // Add the specialization into its lexical context, so that it can
5100 CurContext->addDecl(Specialization);
5102 return Specialization;
5145 /// \brief Diagnose cases where we have an explicit template specialization
5148 /// new specialization/instantiation will have any effect.
5150 /// \param NewLoc the location of the new explicit specialization or
5153 /// \param NewTSK the kind of the new explicit specialization or instantiation.
5157 specialization or instantiatin.
5163 /// specialization or instantiation has no effect and should be ignored.
5208 // is explicitly specialized then that specialization shall be declared
5209 // before the first use of that specialization that would cause an
5213 // Is there any previous explicit specialization declaration?
5244 // specialization for that template, the explicit instantiation has no
5277 // an explicit specialization for that template, the explicit
5312 assert(false && "Missing specialization/instantiation case?");
5318 /// template specialization. The only possible way to get a dependent
5319 /// function template specialization is with a friend declaration,
5355 /// specialization.
5358 /// explicit function template specialization. On successful completion,
5360 /// specialization.
5363 /// function template specialization.
5371 /// this function specialization.
5377 // explicit function template specialization.
5393 // template-id naming an explicit function template specialization
5399 FunctionDecl *Specialization = 0;
5403 Specialization,
5412 Candidates.addDecl(Specialization, I.getAccess());
5429 FunctionDecl *Specialization = cast<FunctionDecl>(*Result);
5432 = Specialization->getTemplateSpecializationInfo();
5433 assert(SpecInfo && "Function template specialization info missing?");
5436 // specialization kind was explicit.
5439 Specialization->setLocation(FD->getLocation());
5441 // FIXME: Check if the prior specialization has a point of instantiation.
5445 // an explicit specialization.
5448 // Check the scope of this explicit specialization.
5451 Specialization->getPrimaryTemplate(),
5452 Specialization, FD->getLocation(),
5458 // explicitly specialized then that specialization shall be declared
5459 // before the first use of that specialization that would cause an implicit
5466 Specialization,
5472 // Mark the prior declaration as an explicit specialization, so that later
5473 // clients know that this is an explicit specialization.
5476 MarkUnusedFileScopedDecl(Specialization);
5480 // specialization, with the template arguments from the previous
5481 // specialization.
5484 TemplateArgumentList(Specialization->getTemplateSpecializationArgs());
5487 FD->setFunctionTemplateSpecialization(Specialization->getPrimaryTemplate(),
5491 FD->setStorageClass(Specialization->getStorageClass());
5493 // The "previous declaration" for this function template specialization is
5494 // the prior function template specialization.
5496 Previous.addDecl(Specialization);
5501 /// specialization.
5504 /// explicit member function specialization. On successful completion,
5506 /// specialization.
5509 /// specialization.
5512 /// by this function specialization; the set will be modified to contain the
5583 // Make sure that this is a specialization of a member.
5594 // before the first use of that specialization that would cause an implicit
5597 assert(MSInfo && "Member specialization info missing?");
5608 // Check the scope of this explicit specialization.
5616 // the original declaration to note that it is an explicit specialization
5661 // this specialization matches.
5732 // or a static data member of a class template specialization, the name of
5733 // the class template specialization in the qualified-id for the member
5746 // Explicit instantiation of a class template specialization
5765 // Check that the specialization uses the same tag kind as the
5804 // Find the class template specialization declaration that
5823 ClassTemplateSpecializationDecl *Specialization = 0;
5838 // Since the only prior class template specialization with these
5843 Specialization = PrevDecl;
5844 Specialization->setLocation(TemplateNameLoc);
5849 if (!Specialization) {
5850 // Create a new class template specialization declaration node for
5851 // this explicit specialization.
5852 Specialization
5860 SetNestedNameSpecifier(Specialization, SS);
5863 // Insert the new specialization.
5864 ClassTemplate->AddSpecialization(Specialization, InsertPos);
5871 // specialization's declaration the way that the user actually wrote
5874 // arguments in the specialization.
5878 Context.getTypeDeclType(Specialization));
5879 Specialization->setTypeAsWritten(WrittenTy);
5883 Specialization->setExternLoc(ExternLoc);
5884 Specialization->setTemplateKeywordLoc(TemplateLoc);
5889 Specialization->setLexicalDeclContext(CurContext);
5890 CurContext->addDecl(Specialization);
5894 // Set the template specialization kind.
5895 Specialization->setTemplateSpecializationKind(TSK);
5896 return Specialization;
5908 Specialization->getDefinition());
5910 InstantiateClassTemplateSpecialization(TemplateNameLoc, Specialization, TSK);
5912 MarkVTableUsed(TemplateNameLoc, Specialization, true);
5913 Specialization->setPointOfInstantiation(Def->getPointOfInstantiation());
5916 // Instantiate the members of this class template specialization.
5918 Specialization->getDefinition());
5931 // Set the template specialization kind.
5932 Specialization->setTemplateSpecializationKind(TSK);
5933 return Specialization;
6012 assert(MSInfo && "No member specialization information?");
6152 // FIXME: Check for explicit specialization?
6163 // or a static data member of a class template specialization, the name of
6164 // the class template specialization in the qualified-id for the member
6178 assert(MSInfo && "Missing static data member specialization info?");
6239 FunctionDecl *Specialization = 0;
6243 R, Specialization, Info)) {
6249 Matches.addDecl(Specialization, P.getAccess());
6252 // Find the most specialized function template specialization.
6264 FunctionDecl *Specialization = cast<FunctionDecl>(*Result);
6266 if (Specialization->getTemplateSpecializationKind() == TSK_Undeclared) {
6269 << Specialization
6270 << (Specialization->getTemplateSpecializationKind() ==
6272 Diag(Specialization->getLocation(), diag::note_explicit_instantiation_here);
6276 FunctionDecl *PrevDecl = Specialization->getPreviousDeclaration();
6277 if (!PrevDecl && Specialization->isThisDeclarationADefinition())
6278 PrevDecl = Specialization;
6290 // explicit specialization.
6295 Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc());
6298 InstantiateFunctionDefinition(D.getIdentifierLoc(), Specialization);
6302 // or a static data member of a class template specialization, the name of
6303 // the class template specialization in the qualified-id for the member
6307 FunctionTemplateDecl *FunTmpl = Specialization->getPrimaryTemplate();
6313 << Specialization << D.getCXXScopeSpec().getRange();
6317 : Specialization->getInstantiatedFromMemberFunction(),
6412 // Construct a dependent template specialization type.
6439 // Provide source-location information for the template specialization
6606 /// a class template (or class template partial specialization) that was parsed
6608 /// partial specialization thereof). This routine will rebuild that type now