Home | History | Annotate | Download | only in Sema

Lines Matching refs: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
916 // class template partial specialization, or class template specialization.
973 // In a redeclaration, partial specialization, explicit
974 // specialization or explicit instantiation of a class template,
1067 // If we are providing an explicit specialization of a member that is a
1556 /// declared is an explicit specialization, false otherwise.
1562 /// template specialization), or may be NULL (if what we're declaring isn't
1589 // If we found an explicit specialization that prevents us from needing
1591 // explicit specialization.
1599 // If this type is an explicit specialization, we're done.
1631 // Look one step prior in a dependent template specialization type.
1672 // enclosing class templates. In an explicit specialization for
1694 // class templates. In an explicit specialization for such a member, the
1739 // In an explicit specialization declaration for a member of a class
1760 // here, then it's an explicit specialization.
1859 // If there was a specialization somewhere, such that 'template<>' is
1861 // specialization occurred.
1875 // In an explicit specialization declaration for a member of a class
1935 // build a template specialization type for it.
1959 // Find the canonical type for this type alias template specialization.
1983 // This class template specialization is a dependent
1985 // specialization type that contains all of the converted
2040 // Find the class template specialization declaration that
2048 // specialization. Create the canonical declaration and add it to
2064 "type of non-dependent specialization is not a RecordType");
2068 // specialization, which refers back to the class template
2069 // specialization we created or found.
2187 // resolves to an alias template specialization, the
2213 // Provide source-location information for the template specialization.
4780 /// \brief Determine what kind of template specialization the given declaration
4796 /// \brief Check whether a specialization is well-formed in the current
4799 /// This routine determines whether a template specialization can be declared
4812 /// \param Loc the location of the explicit specialization
4815 /// \param IsPartialSpecialization whether this is a partial specialization of
4848 // An explicit specialization shall be declared in the namespace
4851 // template is a member. An explicit specialization of a member
4856 // specialization may be defined later in the name- space in which
4857 // the explicit specialization was declared, or in a namespace
4858 // that encloses the one in which the explicit specialization was
4868 // Do not warn for class scope explicit specialization during
4891 // A class template partial specialization may be declared or redeclared
4902 // An explicit specialization shall be declared in the namespace of which
4905 // An explicit specialization of a member function, member class or
4910 // An explicit specialization shall be declared in a namespace enclosing
4958 // FIXME: check for specialization-after-instantiation errors and such.
4964 /// that checks non-type template partial specialization arguments.
5006 // specialization, the following restrictions apply:
5009 // specialization except when the argument expression is a
5020 // parameter of the specialization.
5035 /// partial specialization according to C++ [temp.class.spec]p9.
5041 /// partial specialization.
5125 // The template parameter list of a specialization shall not
5168 // Check that the specialization uses the same tag kind as the
5203 // Find the class template (partial) specialization declaration that
5237 ClassTemplateSpecializationDecl *Specialization = 0;
5239 // Check whether we can declare a class template specialization in
5252 // Since the only prior class template specialization with these
5254 // referencing this specialization as a friend, reuse that
5257 Specialization = PrevDecl;
5258 Specialization->setLocation(TemplateNameLoc);
5260 Specialization->setTemplateParameterListsInfo(Context,
5265 CanonType = Context.getTypeDeclType(Specialization);
5268 // arguments of the class template partial specialization.
5278 // -- The argument list of the specialization shall not be identical
5293 // Create a new class template partial specialization declaration node.
5319 Specialization = Partial;
5321 // If we are providing an explicit specialization of a member class
5322 // template specialization, make a note of that.
5327 // partial specialization are deducible from the template
5328 // arguments. If not, this class template partial specialization
5355 // Create a new class template specialization declaration node for
5356 // this explicit specialization or friend declaration.
5357 Specialization
5365 SetNestedNameSpecifier(Specialization, SS);
5367 Specialization->setTemplateParameterListsInfo(Context,
5373 ClassTemplate->AddSpecialization(Specialization, InsertPos);
5375 CanonType = Context.getTypeDeclType(Specialization);
5380 // explicitly specialized then that specialization shall be declared
5381 // before the first use of that specialization that would cause an implicit
5387 // Is there any previous explicit specialization declaration?
5397 << Context.getTypeDeclType(Specialization) << Range;
5407 // If this is not a friend, note that this is an explicit specialization.
5409 Specialization->setSpecializationKind(TSK_ExplicitSpecialization);
5411 // Check that this isn't a redefinition of this specialization.
5413 if (RecordDecl *Def = Specialization->getDefinition()) {
5416 << Context.getTypeDeclType(Specialization) << Range;
5418 Specialization->setInvalidDecl();
5424 ProcessDeclAttributeList(S, Specialization, Attr);
5427 Diag(Specialization->getLocation(), diag::err_module_private_specialization)
5432 // specialization as the user wrote in the specialization
5434 // from the specialization's declaration the way that the user
5435 // actually wrote the specialization, rather than formatting the
5437 // template arguments in the specialization.
5442 Specialization->setTypeAsWritten(WrittenTy);
5443 Specialization->setTemplateKeywordLoc(TemplateKWLoc);
5448 // A template explicit specialization is in the scope of the
5455 Specialization->setLexicalDeclContext(CurContext);
5457 // We may be starting the definition of this specialization.
5459 Specialization->startDefinition();
5469 // Add the specialization into its lexical context, so that it can
5472 CurContext->addDecl(Specialization);
5474 return Specialization;
5522 // Explicit instantiations following a specialization have no effect and
5535 /// \brief Diagnose cases where we have an explicit template specialization
5538 /// new specialization/instantiation will have any effect.
5540 /// \param NewLoc the location of the new explicit specialization or
5543 /// \param NewTSK the kind of the new explicit specialization or instantiation.
5547 /// \param PrevTSK the kind of the old explicit specialization or instantiatin.
5553 /// specialization or instantiation has no effect and should be ignored.
5597 // is explicitly specialized then that specialization shall be declared
5598 // before the first use of that specialization that would cause an
5602 // Is there any previous explicit specialization declaration?
5632 // specialization for that template, the explicit instantiation has no
5645 // Explicit instantiations following a specialization have no effect and
5666 // an explicit specialization for that template, the explicit
5688 // specialization for that template, the explicit instantiation has no
5691 // Is there any previous explicit specialization declaration?
5714 llvm_unreachable("Missing specialization/instantiation case?");
5718 /// template specialization. The only possible way to get a dependent
5719 /// function template specialization is with a friend declaration,
5755 /// specialization.
5758 /// explicit function template specialization. On successful completion,
5760 /// specialization.
5763 /// function template specialization.
5771 /// this function specialization.
5777 // explicit function template specialization.
5793 // template-id naming an explicit function template specialization
5799 FunctionDecl *Specialization = 0;
5803 Specialization,
5812 Candidates.addDecl(Specialization, I.getAccess());
5829 FunctionDecl *Specialization = cast<FunctionDecl>(*Result);
5832 = Specialization->getTemplateSpecializationInfo();
5833 assert(SpecInfo && "Function template specialization info missing?");
5836 // specialization kind was explicit.
5839 Specialization->setLocation(FD->getLocation());
5840 // C++11 [dcl.constexpr]p1: An explicit specialization of a constexpr
5843 Specialization->setConstexpr(FD->isConstexpr());
5846 // FIXME: Check if the prior specialization has a point of instantiation.
5850 // an explicit specialization.
5853 // Check the scope of this explicit specialization.
5856 Specialization->getPrimaryTemplate(),
5857 Specialization, FD->getLocation(),
5863 // explicitly specialized then that specialization shall be declared
5864 // before the first use of that specialization that would cause an implicit
5871 Specialization,
5877 // Mark the prior declaration as an explicit specialization, so that later
5878 // clients know that this is an explicit specialization.
5881 MarkUnusedFileScopedDecl(Specialization);
5885 // specialization, with the template arguments from the previous
5886 // specialization.
5889 TemplateArgumentList(Specialization->getTemplateSpecializationArgs());
5890 FD->setFunctionTemplateSpecialization(Specialization->getPrimaryTemplate(),
5894 FD->setStorageClass(Specialization->getStorageClass());
5896 // The "previous declaration" for this function template specialization is
5897 // the prior function template specialization.
5899 Previous.addDecl(Specialization);
5904 /// specialization.
5907 /// explicit member function specialization. On successful completion,
5909 /// specialization.
5912 /// specialization.
5915 /// by this function specialization; the set will be modified to contain the
5994 // Make sure that this is a specialization of a member.
6004 // explicitly specialized then that specialization shall be declared
6005 // before the first use of that specialization that would cause an implicit
6008 assert(MSInfo && "Member specialization info missing?");
6019 // Check the scope of this explicit specialization.
6027 // the original declaration to note that it is an explicit specialization
6083 // this specialization matches.
6150 // or a static data member of a class template specialization, the name of
6151 // the class template specialization in the qualified-id for the member
6164 // Explicit instantiation of a class template specialization
6183 // Check that the specialization uses the same tag kind as the
6219 // Find the class template specialization declaration that
6238 ClassTemplateSpecializationDecl *Specialization = 0;
6253 // Since the only prior class template specialization with these
6258 Specialization = PrevDecl;
6259 Specialization->setLocation(TemplateNameLoc);
6264 if (!Specialization) {
6265 // Create a new class template specialization declaration node for
6266 // this explicit specialization.
6267 Specialization
6275 SetNestedNameSpecifier(Specialization, SS);
6278 // Insert the new specialization.
6279 ClassTemplate->AddSpecialization(Specialization, InsertPos);
6286 // specialization's declaration the way that the user actually wrote
6289 // arguments in the specialization.
6293 Context.getTypeDeclType(Specialization));
6294 Specialization->setTypeAsWritten(WrittenTy);
6298 Specialization->setExternLoc(ExternLoc);
6299 Specialization->setTemplateKeywordLoc(TemplateLoc);
6302 ProcessDeclAttributeList(S, Specialization, Attr);
6307 Specialization->setLexicalDeclContext(CurContext);
6308 CurContext->addDecl(Specialization);
6312 // Set the template specialization kind.
6313 Specialization->setTemplateSpecializationKind(TSK);
6314 return Specialization;
6326 Specialization->getDefinition());
6328 InstantiateClassTemplateSpecialization(TemplateNameLoc, Specialization, TSK);
6330 MarkVTableUsed(TemplateNameLoc, Specialization, true);
6331 Specialization->setPointOfInstantiation(Def->getPointOfInstantiation());
6334 // Instantiate the members of this class template specialization.
6336 Specialization->getDefinition());
6349 // Set the template specialization kind.
6350 Specialization->setTemplateSpecializationKind(TSK);
6351 return Specialization;
6427 assert(MSInfo && "No member specialization information?");
6572 // FIXME: Check for explicit specialization?
6583 // or a static data member of a class template specialization, the name of
6584 // the class template specialization in the qualified-id for the member
6598 assert(MSInfo && "Missing static data member specialization info?");
6659 FunctionDecl *Specialization = 0;
6663 R, Specialization, Info)) {
6669 Matches.addDecl(Specialization, P.getAccess());
6672 // Find the most specialized function template specialization.
6684 FunctionDecl *Specialization = cast<FunctionDecl>(*Result);
6686 if (Specialization->getTemplateSpecializationKind() == TSK_Undeclared) {
6689 << Specialization
6690 << (Specialization->getTemplateSpecializationKind() ==
6692 Diag(Specialization->getLocation(), diag::note_explicit_instantiation_here);
6696 FunctionDecl *PrevDecl = Specialization->getPreviousDecl();
6697 if (!PrevDecl && Specialization->isThisDeclarationADefinition())
6698 PrevDecl = Specialization;
6710 // explicit specialization.
6715 Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc());
6718 ProcessDeclAttributeList(S, Specialization, Attr);
6721 Specialization);
6725 // or a static data member of a class template specialization, the name of
6726 // the class template specialization in the qualified-id for the member
6730 FunctionTemplateDecl *FunTmpl = Specialization->getPrimaryTemplate();
6736 << Specialization << D.getCXXScopeSpec().getRange();
6740 : Specialization->getInstantiatedFromMemberFunction(),
6840 // Construct a dependent template specialization type.
6868 // Provide source-location information for the template specialization type.
7034 /// a class template (or class template partial specialization) that was parsed
7036 /// partial specialization thereof). This routine will rebuild that type now