Lines Matching refs:Instantiation
1 //===------- SemaTemplateInstantiate.cpp - C++ Template Instantiation ------===/
9 // This file implements C++ template instantiation.
30 // Template Instantiation Support
36 /// \param D the declaration for which we are computing template instantiation
48 /// used to determine the proper set of template instantiation arguments for
65 // Add template arguments from a variable template instantiation.
99 // Add template arguments from a class template instantiation.
445 "forgot to remove a lookup module for a template instantiation");
477 /// \brief Prints the current instantiation stack through a series of
495 // Skip this instantiation?
678 // An instantiation of an alias template may or may not be a SFINAE
685 // This is a template instantiation, so there is no SFINAE.
691 // A default template argument instantiation and substitution into
722 // Template Instantiation for Types
743 /// For the purposes of template instantiation, a type has already been
955 // because we are performing instantiation from explicitly-specified
1095 // because we are performing instantiation from explicitly-specified
1176 // because we are performing instantiation from explicitly-specified
1230 // Find the instantiation of the template argument. This is
1313 // parameters in the instantiation of the function decl.
1336 assert(Found && "no instantiation for parameter pack");
1371 // FindInstantiatedDecl will find it in the local instantiation scope.
1394 // We need a local instantiation scope for this function prototype.
1403 // We need a local instantiation scope for this function prototype.
1427 // because we are performing instantiation from explicitly-specified
1463 // TODO: only do this uniquing once, at the start of instantiation.
1542 /// \returns If the instantiation succeeds, the instantiated
1549 "Cannot perform an instantiation without some context on the "
1550 "instantiation stack");
1565 "Cannot perform an instantiation without some context on the "
1566 "instantiation stack");
1595 "Cannot perform an instantiation without some context on the "
1596 "instantiation stack");
1641 /// instantiation of default-argument expressions.
1649 "Cannot perform an instantiation without some context on the "
1650 "instantiation stack");
1776 "Cannot perform an instantiation without some context on the "
1777 "instantiation stack");
1792 Sema::SubstBaseSpecifiers(CXXRecordDecl *Instantiation,
1803 Instantiation->setInvalidDecl();
1845 = CheckBaseSpecifier(Instantiation,
1879 = CheckBaseSpecifier(Instantiation,
1891 AttachBaseSpecifiers(Instantiation, InstantiatedBases.data(),
1910 TagDecl *Instantiation,
1926 << S.Context.getTypeDeclType(Instantiation);
1929 Instantiation->setInvalidDecl();
1933 << S.Context.getTypeDeclType(Instantiation);
1938 << S.Context.getTypeDeclType(Instantiation);
1942 // In general, Instantiation isn't marked invalid to get more than one
1947 Instantiation->setInvalidDecl();
1953 /// \param PointOfInstantiation The point of instantiation within the
1956 /// \param Instantiation is the declaration whose definition is being
1960 /// \param Pattern is the pattern from which the instantiation
1967 /// \param TSK the kind of implicit or explicit instantiation to perform.
1975 CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern,
1981 if (DiagnoseUninstantiableTemplate(*this, PointOfInstantiation, Instantiation,
1982 Instantiation->getInstantiatedFromMemberClass(),
1987 // \brief Record the point of instantiation.
1989 = Instantiation->getMemberSpecializationInfo()) {
1993 = dyn_cast<ClassTemplateSpecializationDecl>(Instantiation)) {
1998 InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation);
2002 // Enter the scope of this instantiation. We don't use
2004 ContextRAII SavedContext(*this, Instantiation);
2008 // If this is an instantiation of a local class, merge this local
2009 // instantiation scope with the enclosing scope. Otherwise, every
2010 // instantiation of a class has its own local instantiation scope.
2011 bool MergeWithParentScope = !Instantiation->isDefinedOutsideFunctionOrMethod();
2014 // Pull attributes from the pattern onto the instantiation.
2015 InstantiateAttrs(TemplateArgs, Pattern, Instantiation);
2017 // Start the definition of this instantiation.
2018 Instantiation->startDefinition();
2020 Instantiation->setTagKind(Pattern->getTagKind());
2023 if (SubstBaseSpecifiers(Instantiation, Pattern, TemplateArgs))
2024 Instantiation->setInvalidDecl();
2026 TemplateDeclInstantiator Instantiator(*this, Instantiation, TemplateArgs);
2030 // Delay instantiation of late parsed attributes.
2050 Instantiation->setInvalidDecl();
2063 // C++11 [temp.inst]p1: The implicit instantiation of a class template
2064 // specialization causes the implicit instantiation of the definitions
2066 // Record a point of instantiation for this implicit instantiation.
2078 Instantiation->setInvalidDecl();
2084 Instantiation->setInvalidDecl();
2094 ActOnFields(0, Instantiation->getLocation(), Instantiation, Fields,
2096 CheckCompletedCXXClass(Instantiation);
2106 CXXThisScopeRAII ThisScope(*this, Instantiation, (unsigned)0);
2148 ActOnFinishDelayedMemberInitializers(Instantiation);
2151 Instantiation->setLocation(Pattern->getLocation());
2152 Instantiation->setLocStart(Pattern->getInnerLocStart());
2153 Instantiation->setRBraceLoc(Pattern->getRBraceLoc());
2156 if (!Instantiation->isInvalidDecl()) {
2169 Instantiation->setInvalidDecl();
2175 // Exit the scope of this instantiation.
2178 if (!Instantiation->isInvalidDecl()) {
2179 Consumer.HandleTagDeclDefinition(Instantiation);
2181 // Always emit the vtable for an explicit instantiation definition
2184 MarkVTableUsed(PointOfInstantiation, Instantiation, true);
2187 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
2202 /// \param TSK The kind of implicit or explicit instantiation to perform.
2206 EnumDecl *Instantiation, EnumDecl *Pattern,
2210 if (DiagnoseUninstantiableTemplate(*this, PointOfInstantiation, Instantiation,
2211 Instantiation->getInstantiatedFromMemberEnum(),
2216 // Record the point of instantiation.
2218 = Instantiation->getMemberSpecializationInfo()) {
2223 InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation);
2227 // Enter the scope of this instantiation. We don't use
2229 ContextRAII SavedContext(*this, Instantiation);
2235 // Pull attributes from the pattern onto the instantiation.
2236 InstantiateAttrs(TemplateArgs, Pattern, Instantiation);
2238 TemplateDeclInstantiator Instantiator(*this, Instantiation, TemplateArgs);
2239 Instantiator.InstantiateEnumDefinition(Instantiation, Pattern);
2241 // Exit the scope of this instantiation.
2244 return Instantiation->isInvalidDecl();
2262 // Perform the actual instantiation on the canonical declaration.
2272 // An explicit instantiation definition follows an explicit instantiation
2274 // explicit instantiation.
2277 // If this is an explicit instantiation definition, mark the
2300 // instantiation of the class, it is necessary to determine
2301 // whether the instantiation is to be generated using the primary
2339 // instantiation is generated from that specialization.
2406 // -- If no matches are found, the instantiation is generated
2431 /// of the given class, which is an instantiation of a class template
2435 CXXRecordDecl *Instantiation,
2438 for (DeclContext::decl_iterator D = Instantiation->decls_begin(),
2439 DEnd = Instantiation->decls_end();
2465 // An explicit instantiation definition that names a class template
2467 // specialization and is only an explicit instantiation definition
2469 // instantiation.
2498 // An explicit instantiation definition that names a class template
2500 // specialization and is only an explicit instantiation definition
2502 // instantiation.
2541 // An explicit instantiation definition that names a class template
2543 // specialization and is only an explicit instantiation definition
2545 // instantiation.
2606 /// explicit instantiation.
2613 // An explicit instantiation that names a class template
2618 // containing the explicit instantiation, except as described
2710 // When storing ParmVarDecls in the local instantiation scope, we always