Home | History | Annotate | Download | only in Sema

Lines Matching refs:Instantiation

1 //===------- SemaTemplateInstantiate.cpp - C++ Template Instantiation ------===/
9 // This file implements C++ template instantiation.
31 // Template Instantiation Support
37 /// \param D the declaration for which we are computing template instantiation
49 /// used to determine the proper set of template instantiation arguments for
66 // Add template arguments from a variable template instantiation.
110 // Add template arguments from a class template instantiation.
210 // Don't allow further instantiation if a fatal error has occcured. Any
339 "forgot to remove a lookup module for a template instantiation");
371 /// \brief Prints the current instantiation stack through a series of
389 // Skip this instantiation?
578 // An instantiation of an alias template may or may not be a SFINAE
585 // This is a template instantiation, so there is no SFINAE.
591 // A default template argument instantiation and substitution into
622 // Template Instantiation for Types
643 /// For the purposes of template instantiation, a type has already been
718 // operator template of a generic lambda, update the "instantiation of"
869 // because we are performing instantiation from explicitly-specified
1009 // because we are performing instantiation from explicitly-specified
1072 // because we are performing instantiation from explicitly-specified
1144 // Find the instantiation of the template argument. This is
1225 // parameters in the instantiation of the function decl.
1248 assert(Found && "no instantiation for parameter pack");
1283 // FindInstantiatedDecl will find it in the local instantiation scope.
1310 // We need a local instantiation scope for this function prototype.
1334 // because we are performing instantiation from explicitly-specified
1370 // TODO: only do this uniquing once, at the start of instantiation.
1449 /// \returns If the instantiation succeeds, the instantiated
1456 "Cannot perform an instantiation without some context on the "
1457 "instantiation stack");
1472 "Cannot perform an instantiation without some context on the "
1473 "instantiation stack");
1502 "Cannot perform an instantiation without some context on the "
1503 "instantiation stack");
1548 /// instantiation of default-argument expressions and to avoid
1557 "Cannot perform an instantiation without some context on the "
1558 "instantiation stack");
1727 "Cannot perform an instantiation without some context on the "
1728 "instantiation stack");
1744 Sema::SubstBaseSpecifiers(CXXRecordDecl *Instantiation,
1753 Instantiation->setInvalidDecl();
1795 = CheckBaseSpecifier(Instantiation,
1829 = CheckBaseSpecifier(Instantiation,
1841 AttachBaseSpecifiers(Instantiation, InstantiatedBases.data(),
1860 TagDecl *Instantiation,
1876 << S.Context.getTypeDeclType(Instantiation);
1879 Instantiation->setInvalidDecl();
1883 << S.Context.getTypeDeclType(Instantiation);
1888 << S.Context.getTypeDeclType(Instantiation);
1892 // In general, Instantiation isn't marked invalid to get more than one
1897 Instantiation->setInvalidDecl();
1903 /// \param PointOfInstantiation The point of instantiation within the
1906 /// \param Instantiation is the declaration whose definition is being
1910 /// \param Pattern is the pattern from which the instantiation
1917 /// \param TSK the kind of implicit or explicit instantiation to perform.
1925 CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern,
1931 Instantiation,
1932 Instantiation->getInstantiatedFromMemberClass(),
1937 // \brief Record the point of instantiation.
1939 = Instantiation->getMemberSpecializationInfo()) {
1943 = dyn_cast<ClassTemplateSpecializationDecl>(Instantiation)) {
1948 InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation);
1952 // Enter the scope of this instantiation. We don't use
1954 ContextRAII SavedContext(*this, Instantiation);
1958 // If this is an instantiation of a local class, merge this local
1959 // instantiation scope with the enclosing scope. Otherwise, every
1960 // instantiation of a class has its own local instantiation scope.
1961 bool MergeWithParentScope = !Instantiation->isDefinedOutsideFunctionOrMethod();
1964 // Pull attributes from the pattern onto the instantiation.
1965 InstantiateAttrs(TemplateArgs, Pattern, Instantiation);
1967 // Start the definition of this instantiation.
1968 Instantiation->startDefinition();
1970 // The instantiation is visible here, even if it was first declared in an
1972 Instantiation->setHidden(false);
1974 // FIXME: This loses the as-written tag kind for an explicit instantiation.
1975 Instantiation->setTagKind(Pattern->getTagKind());
1978 if (SubstBaseSpecifiers(Instantiation, Pattern, TemplateArgs))
1979 Instantiation->setInvalidDecl();
1981 TemplateDeclInstantiator Instantiator(*this, Instantiation, TemplateArgs);
1983 // Delay instantiation of late parsed attributes.
2001 Instantiation->setInvalidDecl();
2010 // C++11 [temp.inst]p1: The implicit instantiation of a class template
2011 // specialization causes the implicit instantiation of the definitions
2013 // Record a point of instantiation for this implicit instantiation.
2025 Instantiation->setInvalidDecl();
2031 Instantiation->setInvalidDecl();
2041 ActOnFields(nullptr, Instantiation->getLocation(), Instantiation, Fields,
2043 CheckCompletedCXXClass(Instantiation);
2047 ActOnFinishCXXNonNestedClass(Instantiation);
2072 ActOnFinishDelayedMemberInitializers(Instantiation);
2077 Instantiation->setLocation(Pattern->getLocation());
2078 Instantiation->setLocStart(Pattern->getInnerLocStart());
2079 Instantiation->setRBraceLoc(Pattern->getRBraceLoc());
2082 if (!Instantiation->isInvalidDecl()) {
2094 Instantiation->setInvalidDecl();
2107 Instantiation->setInvalidDecl();
2113 // Exit the scope of this instantiation.
2116 if (!Instantiation->isInvalidDecl()) {
2117 Consumer.HandleTagDeclDefinition(Instantiation);
2119 // Always emit the vtable for an explicit instantiation definition
2122 MarkVTableUsed(PointOfInstantiation, Instantiation, true);
2125 return Instantiation->isInvalidDecl();
2130 /// \param PointOfInstantiation The point of instantiation within the
2132 /// \param Instantiation is the declaration whose definition is being
2136 /// \param Pattern The templated declaration from which the instantiation
2140 /// \param TSK The kind of implicit or explicit instantiation to perform.
2144 EnumDecl *Instantiation, EnumDecl *Pattern,
2148 if (DiagnoseUninstantiableTemplate(*this, PointOfInstantiation, Instantiation,
2149 Instantiation->getInstantiatedFromMemberEnum(),
2154 // Record the point of instantiation.
2156 = Instantiation->getMemberSpecializationInfo()) {
2161 InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation);
2165 // The instantiation is visible here, even if it was first declared in an
2167 Instantiation->setHidden(false);
2169 // Enter the scope of this instantiation. We don't use
2171 ContextRAII SavedContext(*this, Instantiation);
2177 // Pull attributes from the pattern onto the instantiation.
2178 InstantiateAttrs(TemplateArgs, Pattern, Instantiation);
2180 TemplateDeclInstantiator Instantiator(*this, Instantiation, TemplateArgs);
2181 Instantiator.InstantiateEnumDefinition(Instantiation, Pattern);
2183 // Exit the scope of this instantiation.
2186 return Instantiation->isInvalidDecl();
2192 /// \param PointOfInstantiation The point of instantiation within the
2194 /// \param Instantiation is the declaration whose definition is being
2198 /// \param Pattern The templated declaration from which the instantiation
2205 SourceLocation PointOfInstantiation, FieldDecl *Instantiation,
2211 assert(Instantiation->getInClassInitStyle() ==
2213 "pattern and instantiation disagree about init style");
2229 Instantiation->setInvalidDecl();
2233 InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation);
2237 // Enter the scope of this instantiation. We don't use PushDeclContext because
2239 ContextRAII SavedContext(*this, Instantiation->getParent());
2247 CXXThisScopeRAII ThisScope(*this, Instantiation->getParent(), /*TypeQuals=*/0);
2254 Instantiation, Init ? Init->getLocStart() : SourceLocation(), Init);
2256 // Exit the scope of this instantiation.
2260 return !Instantiation->getInClassInitializer();
2276 // Perform the actual instantiation on the canonical declaration.
2287 // instantiation of the class, it is necessary to determine
2288 // whether the instantiation is to be generated using the primary
2325 // instantiation is generated from that specialization.
2392 // -- If no matches are found, the instantiation is generated
2417 /// of the given class, which is an instantiation of a class template
2421 CXXRecordDecl *Instantiation,
2425 // things, in case we have an explicit instantiation definition in a PCM, a
2430 (TSK == TSK_ImplicitInstantiation && Instantiation->isLocalClass())) &&
2432 for (auto *D : Instantiation->decls()) {
2453 // An explicit instantiation definition that names a class template
2455 // specialization and is only an explicit instantiation definition
2457 // instantiation.
2495 // An explicit instantiation definition that names a class template
2497 // specialization and is only an explicit instantiation definition
2499 // instantiation.
2541 // An explicit instantiation definition that names a class template
2543 // specialization and is only an explicit instantiation definition
2545 // instantiation.
2602 // instantiation.
2605 Instantiation->getTemplateInstantiationPattern();
2619 /// explicit instantiation.
2626 // An explicit instantiation that names a class template
2631 // containing the explicit instantiation, except as described
2722 // When storing ParmVarDecls in the local instantiation scope, we always
2771 // Local types referenced prior to definition may require instantiation.
2822 "Creating local pack after instantiation of local");