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.
359 "forgot to remove a lookup module for a template instantiation");
391 /// \brief Prints the current instantiation stack through a series of
409 // Skip this instantiation?
594 // An instantiation of an alias template may or may not be a SFINAE
601 // This is a template instantiation, so there is no SFINAE.
607 // A default template argument instantiation and substitution into
638 // Template Instantiation for Types
659 /// For the purposes of template instantiation, a type has already been
832 // an "instantiation" of the OldTemplate.
842 // be an instantiation of the OldCallOperator.
893 // because we are performing instantiation from explicitly-specified
1033 // because we are performing instantiation from explicitly-specified
1096 // because we are performing instantiation from explicitly-specified
1150 // Find the instantiation of the template argument. This is
1231 // parameters in the instantiation of the function decl.
1254 assert(Found && "no instantiation for parameter pack");
1289 // FindInstantiatedDecl will find it in the local instantiation scope.
1312 // We need a local instantiation scope for this function prototype.
1321 // We need a local instantiation scope for this function prototype.
1345 // because we are performing instantiation from explicitly-specified
1381 // TODO: only do this uniquing once, at the start of instantiation.
1460 /// \returns If the instantiation succeeds, the instantiated
1467 "Cannot perform an instantiation without some context on the "
1468 "instantiation stack");
1483 "Cannot perform an instantiation without some context on the "
1484 "instantiation stack");
1513 "Cannot perform an instantiation without some context on the "
1514 "instantiation stack");
1559 /// instantiation of default-argument expressions.
1567 "Cannot perform an instantiation without some context on the "
1568 "instantiation stack");
1694 "Cannot perform an instantiation without some context on the "
1695 "instantiation stack");
1711 Sema::SubstBaseSpecifiers(CXXRecordDecl *Instantiation,
1720 Instantiation->setInvalidDecl();
1762 = CheckBaseSpecifier(Instantiation,
1796 = CheckBaseSpecifier(Instantiation,
1808 AttachBaseSpecifiers(Instantiation, InstantiatedBases.data(),
1827 TagDecl *Instantiation,
1843 << S.Context.getTypeDeclType(Instantiation);
1846 Instantiation->setInvalidDecl();
1850 << S.Context.getTypeDeclType(Instantiation);
1855 << S.Context.getTypeDeclType(Instantiation);
1859 // In general, Instantiation isn't marked invalid to get more than one
1864 Instantiation->setInvalidDecl();
1870 /// \param PointOfInstantiation The point of instantiation within the
1873 /// \param Instantiation is the declaration whose definition is being
1877 /// \param Pattern is the pattern from which the instantiation
1884 /// \param TSK the kind of implicit or explicit instantiation to perform.
1892 CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern,
1898 if (DiagnoseUninstantiableTemplate(*this, PointOfInstantiation, Instantiation,
1899 Instantiation->getInstantiatedFromMemberClass(),
1904 // \brief Record the point of instantiation.
1906 = Instantiation->getMemberSpecializationInfo()) {
1910 = dyn_cast<ClassTemplateSpecializationDecl>(Instantiation)) {
1915 InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation);
1919 // Enter the scope of this instantiation. We don't use
1921 ContextRAII SavedContext(*this, Instantiation);
1925 // If this is an instantiation of a local class, merge this local
1926 // instantiation scope with the enclosing scope. Otherwise, every
1927 // instantiation of a class has its own local instantiation scope.
1928 bool MergeWithParentScope = !Instantiation->isDefinedOutsideFunctionOrMethod();
1931 // Pull attributes from the pattern onto the instantiation.
1932 InstantiateAttrs(TemplateArgs, Pattern, Instantiation);
1934 // Start the definition of this instantiation.
1935 Instantiation->startDefinition();
1937 // The instantiation is visible here, even if it was first declared in an
1939 Instantiation->setHidden(false);
1941 // FIXME: This loses the as-written tag kind for an explicit instantiation.
1942 Instantiation->setTagKind(Pattern->getTagKind());
1945 if (SubstBaseSpecifiers(Instantiation, Pattern, TemplateArgs))
1946 Instantiation->setInvalidDecl();
1948 TemplateDeclInstantiator Instantiator(*this, Instantiation, TemplateArgs);
1952 // Delay instantiation of late parsed attributes.
1970 Instantiation->setInvalidDecl();
1983 // C++11 [temp.inst]p1: The implicit instantiation of a class template
1984 // specialization causes the implicit instantiation of the definitions
1986 // Record a point of instantiation for this implicit instantiation.
1998 Instantiation->setInvalidDecl();
2004 Instantiation->setInvalidDecl();
2014 ActOnFields(nullptr, Instantiation->getLocation(), Instantiation, Fields,
2016 CheckCompletedCXXClass(Instantiation);
2026 CXXThisScopeRAII ThisScope(*this, Instantiation, (unsigned)0);
2066 ActOnFinishDelayedMemberInitializers(Instantiation);
2071 Instantiation->setLocation(Pattern->getLocation());
2072 Instantiation->setLocStart(Pattern->getInnerLocStart());
2073 Instantiation->setRBraceLoc(Pattern->getRBraceLoc());
2076 if (!Instantiation->isInvalidDecl()) {
2088 Instantiation->setInvalidDecl();
2101 Instantiation->setInvalidDecl();
2107 // Exit the scope of this instantiation.
2110 if (!Instantiation->isInvalidDecl()) {
2111 Consumer.HandleTagDeclDefinition(Instantiation);
2113 // Always emit the vtable for an explicit instantiation definition
2116 MarkVTableUsed(PointOfInstantiation, Instantiation, true);
2119 return Instantiation->isInvalidDecl();
2124 /// \param PointOfInstantiation The point of instantiation within the
2126 /// \param Instantiation is the declaration whose definition is being
2130 /// \param Pattern The templated declaration from which the instantiation
2134 /// \param TSK The kind of implicit or explicit instantiation to perform.
2138 EnumDecl *Instantiation, EnumDecl *Pattern,
2142 if (DiagnoseUninstantiableTemplate(*this, PointOfInstantiation, Instantiation,
2143 Instantiation->getInstantiatedFromMemberEnum(),
2148 // Record the point of instantiation.
2150 = Instantiation->getMemberSpecializationInfo()) {
2155 InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation);
2159 // The instantiation is visible here, even if it was first declared in an
2161 Instantiation->setHidden(false);
2163 // Enter the scope of this instantiation. We don't use
2165 ContextRAII SavedContext(*this, Instantiation);
2171 // Pull attributes from the pattern onto the instantiation.
2172 InstantiateAttrs(TemplateArgs, Pattern, Instantiation);
2174 TemplateDeclInstantiator Instantiator(*this, Instantiation, TemplateArgs);
2175 Instantiator.InstantiateEnumDefinition(Instantiation, Pattern);
2177 // Exit the scope of this instantiation.
2180 return Instantiation->isInvalidDecl();
2196 // Perform the actual instantiation on the canonical declaration.
2206 // An explicit instantiation definition follows an explicit instantiation
2208 // explicit instantiation.
2211 // If this is an explicit instantiation definition, mark the
2234 // instantiation of the class, it is necessary to determine
2235 // whether the instantiation is to be generated using the primary
2272 // instantiation is generated from that specialization.
2339 // -- If no matches are found, the instantiation is generated
2364 /// of the given class, which is an instantiation of a class template
2368 CXXRecordDecl *Instantiation,
2372 // things, in case we have an explicit instantiation definition in a PCM, a
2377 (TSK == TSK_ImplicitInstantiation && Instantiation->isLocalClass())) &&
2379 for (auto *D : Instantiation->decls()) {
2400 // An explicit instantiation definition that names a class template
2402 // specialization and is only an explicit instantiation definition
2404 // instantiation.
2442 // An explicit instantiation definition that names a class template
2444 // specialization and is only an explicit instantiation definition
2446 // instantiation.
2485 // An explicit instantiation definition that names a class template
2487 // specialization and is only an explicit instantiation definition
2489 // instantiation.
2550 /// explicit instantiation.
2557 // An explicit instantiation that names a class template
2562 // containing the explicit instantiation, except as described
2654 // When storing ParmVarDecls in the local instantiation scope, we always