Home | History | Annotate | Download | only in Sema

Lines Matching defs:Specialization

67     //   refers to the specified class template specialization,
68 // which could be the current specialization or another
69 // specialization.
105 // template itself and not a specialization thereof, and is not
923 // class template partial specialization, or class template specialization.
990 // In a redeclaration, partial specialization, explicit
991 // specialization or explicit instantiation of a class template,
1088 // If we are providing an explicit specialization of a member that is a
1594 /// declared is an explicit specialization, false otherwise.
1600 /// template specialization), or may be NULL (if what we're declaring isn't
1627 // If we found an explicit specialization that prevents us from needing
1629 // explicit specialization.
1637 // If this type is an explicit specialization, we're done.
1669 // Look one step prior in a dependent template specialization type.
1710 // enclosing class templates. In an explicit specialization for
1732 // class templates. In an explicit specialization for such a member, the
1777 // In an explicit specialization declaration for a member of a class
1798 // here, then it's an explicit specialization.
1897 // If there was a specialization somewhere, such that 'template<>' is
1899 // specialization occurred.
1913 // In an explicit specialization declaration for a member of a class
1973 // build a template specialization type for it.
1997 // Find the canonical type for this type alias template specialization.
2025 // This class template specialization is a dependent
2027 // specialization type that contains all of the converted
2082 // Find the class template specialization declaration that
2090 // specialization. Create the canonical declaration and add it to
2107 "type of non-dependent specialization is not a RecordType");
2111 // specialization, which refers back to the class template
2112 // specialization we created or found.
2229 // resolves to an alias template specialization, the
2255 // Provide source-location information for the template specialization.
4919 /// \brief Determine what kind of template specialization the given declaration
4935 /// \brief Check whether a specialization is well-formed in the current
4938 /// This routine determines whether a template specialization can be declared
4951 /// \param Loc the location of the explicit specialization or instantiation of
4954 /// \param IsPartialSpecialization whether this is a partial specialization of
4987 // An explicit specialization shall be declared in the namespace
4990 // template is a member. An explicit specialization of a member
4995 // specialization may be defined later in the name- space in which
4996 // the explicit specialization was declared, or in a namespace
4997 // that encloses the one in which the explicit specialization was
5007 // Do not warn for class scope explicit specialization during
5030 // A class template partial specialization may be declared or redeclared
5041 // An explicit specialization shall be declared in the namespace of which
5044 // An explicit specialization of a member function, member class or
5049 // An explicit specialization shall be declared in a namespace enclosing
5097 // FIXME: check for specialization-after-instantiation errors and such.
5103 /// that checks non-type template partial specialization arguments.
5145 // specialization, the following restrictions apply:
5148 // specialization except when the argument expression is a
5159 // parameter of the specialization.
5174 /// partial specialization according to C++ [temp.class.spec]p9.
5180 /// partial specialization.
5264 // The template parameter list of a specialization shall not
5307 // Check that the specialization uses the same tag kind as the
5342 // Find the class template (partial) specialization declaration that
5376 ClassTemplateSpecializationDecl *Specialization = 0;
5378 // Check whether we can declare a class template specialization in
5391 // Since the only prior class template specialization with these
5393 // referencing this specialization as a friend, reuse that
5396 Specialization = PrevDecl;
5397 Specialization->setLocation(TemplateNameLoc);
5399 Specialization->setTemplateParameterListsInfo(Context,
5404 CanonType = Context.getTypeDeclType(Specialization);
5407 // arguments of the class template partial specialization.
5417 // -- The argument list of the specialization shall not be identical
5432 // Create a new class template partial specialization declaration node.
5458 Specialization = Partial;
5460 // If we are providing an explicit specialization of a member class
5461 // template specialization, make a note of that.
5466 // partial specialization are deducible from the template
5467 // arguments. If not, this class template partial specialization
5494 // Create a new class template specialization declaration node for
5495 // this explicit specialization or friend declaration.
5496 Specialization
5504 SetNestedNameSpecifier(Specialization, SS);
5506 Specialization->setTemplateParameterListsInfo(Context,
5512 ClassTemplate->AddSpecialization(Specialization, InsertPos);
5514 CanonType = Context.getTypeDeclType(Specialization);
5519 // explicitly specialized then that specialization shall be declared
5520 // before the first use of that specialization that would cause an implicit
5526 // Is there any previous explicit specialization declaration?
5536 << Context.getTypeDeclType(Specialization) << Range;
5546 // If this is not a friend, note that this is an explicit specialization.
5548 Specialization->setSpecializationKind(TSK_ExplicitSpecialization);
5550 // Check that this isn't a redefinition of this specialization.
5552 if (RecordDecl *Def = Specialization->getDefinition()) {
5555 << Context.getTypeDeclType(Specialization) << Range;
5557 Specialization->setInvalidDecl();
5563 ProcessDeclAttributeList(S, Specialization, Attr);
5568 AddAlignmentAttributesForRecord(Specialization);
5569 AddMsStructLayoutForRecord(Specialization);
5573 Diag(Specialization->getLocation(), diag::err_module_private_specialization)
5578 // specialization as the user wrote in the specialization
5580 // from the specialization's declaration the way that the user
5581 // actually wrote the specialization, rather than formatting the
5583 // template arguments in the specialization.
5588 Specialization->setTypeAsWritten(WrittenTy);
5589 Specialization->setTemplateKeywordLoc(TemplateKWLoc);
5593 // A template explicit specialization is in the scope of the
5600 Specialization->setLexicalDeclContext(CurContext);
5602 // We may be starting the definition of this specialization.
5604 Specialization->startDefinition();
5614 // Add the specialization into its lexical context, so that it can
5617 CurContext->addDecl(Specialization);
5619 return Specialization;
5667 // Explicit instantiations following a specialization have no effect and
5680 /// \brief Diagnose cases where we have an explicit template specialization
5683 /// new specialization/instantiation will have any effect.
5685 /// \param NewLoc the location of the new explicit specialization or
5688 /// \param NewTSK the kind of the new explicit specialization or instantiation.
5692 /// \param PrevTSK the kind of the old explicit specialization or instantiatin.
5698 /// specialization or instantiation has no effect and should be ignored.
5742 // is explicitly specialized then that specialization shall be declared
5743 // before the first use of that specialization that would cause an
5747 // Is there any previous explicit specialization declaration?
5777 // specialization for that template, the explicit instantiation has no
5790 // Explicit instantiations following a specialization have no effect and
5811 // an explicit specialization for that template, the explicit
5833 // specialization for that template, the explicit instantiation has no
5836 // Is there any previous explicit specialization declaration?
5859 llvm_unreachable("Missing specialization/instantiation case?");
5863 /// template specialization.
5865 /// The only possible way to get a dependent function template specialization
5903 /// specialization.
5906 /// explicit function template specialization. On successful completion,
5908 /// specialization.
5911 /// function template specialization.
5919 /// this function specialization.
5925 // explicit function template specialization.
5939 // When matching a constexpr member function template specialization
5941 // specialization has an implicit 'const' (because we don't know whether
5961 // template-id naming an explicit function template specialization
5967 FunctionDecl *Specialization = 0;
5970 Specialization, Info)) {
5978 Candidates.addDecl(Specialization, I.getAccess());
5995 FunctionDecl *Specialization = cast<FunctionDecl>(*Result);
5998 = Specialization->getTemplateSpecializationInfo();
5999 assert(SpecInfo && "Function template specialization info missing?");
6002 // specialization kind was explicit.
6005 Specialization->setLocation(FD->getLocation());
6006 // C++11 [dcl.constexpr]p1: An explicit specialization of a constexpr
6009 Specialization->setConstexpr(FD->isConstexpr());
6012 // FIXME: Check if the prior specialization has a point of instantiation.
6016 // an explicit specialization.
6019 // Check the scope of this explicit specialization.
6022 Specialization->getPrimaryTemplate(),
6023 Specialization, FD->getLocation(),
6029 // explicitly specialized then that specialization shall be declared
6030 // before the first use of that specialization that would cause an implicit
6037 Specialization,
6043 // Mark the prior declaration as an explicit specialization, so that later
6044 // clients know that this is an explicit specialization.
6047 MarkUnusedFileScopedDecl(Specialization);
6051 // specialization, with the template arguments from the previous
6052 // specialization.
6055 TemplateArgumentList(Specialization->getTemplateSpecializationArgs());
6056 FD->setFunctionTemplateSpecialization(Specialization->getPrimaryTemplate(),
6060 FD->setStorageClass(Specialization->getStorageClass());
6062 // The "previous declaration" for this function template specialization is
6063 // the prior function template specialization.
6065 Previous.addDecl(Specialization);
6070 /// specialization.
6073 /// explicit member function specialization. On successful completion,
6075 /// specialization.
6078 /// specialization.
6081 /// by this function specialization; the set will be modified to contain the
6160 // Make sure that this is a specialization of a member.
6170 // explicitly specialized then that specialization shall be declared
6171 // before the first use of that specialization that would cause an implicit
6174 assert(MSInfo && "Member specialization info missing?");
6185 // Check the scope of this explicit specialization.
6193 // the original declaration to note that it is an explicit specialization
6249 // this specialization matches.
6316 // or a static data member of a class template specialization, the name of
6317 // the class template specialization in the qualified-id for the member
6330 // Explicit instantiation of a class template specialization
6349 // Check that the specialization uses the same tag kind as the
6385 // Find the class template specialization declaration that
6404 ClassTemplateSpecializationDecl *Specialization = 0;
6419 // Since the only prior class template specialization with these
6424 Specialization = PrevDecl;
6425 Specialization->setLocation(TemplateNameLoc);
6430 if (!Specialization) {
6431 // Create a new class template specialization declaration node for
6432 // this explicit specialization.
6433 Specialization
6441 SetNestedNameSpecifier(Specialization, SS);
6444 // Insert the new specialization.
6445 ClassTemplate->AddSpecialization(Specialization, InsertPos);
6452 // specialization's declaration the way that the user actually wrote
6455 // arguments in the specialization.
6459 Context.getTypeDeclType(Specialization));
6460 Specialization->setTypeAsWritten(WrittenTy);
6463 Specialization->setExternLoc(ExternLoc);
6464 Specialization->setTemplateKeywordLoc(TemplateLoc);
6467 ProcessDeclAttributeList(S, Specialization, Attr);
6472 Specialization->setLexicalDeclContext(CurContext);
6473 CurContext->addDecl(Specialization);
6477 // Set the template specialization kind.
6478 Specialization->setTemplateSpecializationKind(TSK);
6479 return Specialization;
6491 Specialization->getDefinition());
6493 InstantiateClassTemplateSpecialization(TemplateNameLoc, Specialization, TSK);
6495 MarkVTableUsed(TemplateNameLoc, Specialization, true);
6496 Specialization->setPointOfInstantiation(Def->getPointOfInstantiation());
6499 // Instantiate the members of this class template specialization.
6501 Specialization->getDefinition());
6514 // Set the template specialization kind.
6515 Specialization->setTemplateSpecializationKind(TSK);
6516 return Specialization;
6591 assert(MSInfo && "No member specialization information?");
6736 // FIXME: Check for explicit specialization?
6747 // or a static data member of a class template specialization, the name of
6748 // the class template specialization in the qualified-id for the member
6762 assert(MSInfo && "Missing static data member specialization info?");
6821 FunctionDecl *Specialization = 0;
6825 R, Specialization, Info)) {
6831 Matches.addDecl(Specialization, P.getAccess());
6834 // Find the most specialized function template specialization.
6846 FunctionDecl *Specialization = cast<FunctionDecl>(*Result);
6848 if (Specialization->getTemplateSpecializationKind() == TSK_Undeclared) {
6851 << Specialization
6852 << (Specialization->getTemplateSpecializationKind() ==
6854 Diag(Specialization->getLocation(), diag::note_explicit_instantiation_here);
6858 FunctionDecl *PrevDecl = Specialization->getPreviousDecl();
6859 if (!PrevDecl && Specialization->isThisDeclarationADefinition())
6860 PrevDecl = Specialization;
6872 // explicit specialization.
6877 Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc());
6880 ProcessDeclAttributeList(S, Specialization, Attr);
6883 InstantiateFunctionDefinition(D.getIdentifierLoc(), Specialization);
6887 // or a static data member of a class template specialization, the name of
6888 // the class template specialization in the qualified-id for the member
6892 FunctionTemplateDecl *FunTmpl = Specialization->getPrimaryTemplate();
6898 << Specialization << D.getCXXScopeSpec().getRange();
6902 : Specialization->getInstantiatedFromMemberFunction(),
7002 // Construct a dependent template specialization type.
7030 // Provide source-location information for the template specialization type.
7059 // ... within an explicitly-written template specialization...
7242 /// a class template (or class template partial specialization) that was parsed
7244 /// partial specialization thereof). This routine will rebuild that type now