Home | History | Annotate | Download | only in AST

Lines Matching full:template

217   /// that's not a template specialization; otherwise it's the pattern
314 bool mangleSubstitution(TemplateName Template);
328 void addSubstitution(TemplateName Template);
362 void mangleTemplatePrefix(TemplateName Template);
503 // 1. Template functions (names or types) have return types encoded, with
508 // 3. Non-template function names do not have return types encoded.
521 // Mangle the type of the primary template.
558 // Check if we have a function template.
566 // Check if we have a class template.
573 // Check if we have a variable template.
586 // ::= <unscoped-template-name> <template-args>
606 // Check if we have a template.
649 // <unscoped-template-name> ::= <unscoped-name>
654 // <template-template-param> ::= <template-param>
663 void CXXNameMangler::mangleUnscopedTemplateName(TemplateName Template) {
664 // <unscoped-template-name> ::= <unscoped-name>
666 if (TemplateDecl *TD = Template.getAsTemplateDecl())
669 if (mangleSubstitution(Template))
672 DependentTemplateName *Dependent = Template.getAsDependentTemplateName();
673 assert(Dependent && "Not a dependent template name?");
679 addSubstitution(Template);
769 // FIXME: GCC does not appear to mangle the template arguments when
770 // the template in question is a dependent template name. Should we
778 TemplateName Template = getASTContext().getDependentTemplateName(
780 mangleTemplatePrefix(Template);
782 // FIXME: GCC does not appear to mangle the template arguments when
783 // the template in question is a dependent template name. Should we
853 // - a template type parameter
854 // - a template template parameter with arguments
1099 // ::= N [<CV-qualifiers>] [<ref-qualifier>] <template-prefix>
1100 // <template-args> E
1113 // Check if we have a template.
1129 // <nested-name> ::= N [<CV-qualifiers>] <template-prefix> <template-args> E
1338 // ::= <template-prefix> <template-args>
1339 // ::= <template-param>
1357 // Check if we have a template.
1370 void CXXNameMangler::mangleTemplatePrefix(TemplateName Template) {
1371 // <template-prefix> ::= <prefix> <template unqualified-name>
1372 // ::= <template-param>
1374 if (TemplateDecl *TD = Template.getAsTemplateDecl())
1377 if (QualifiedTemplateName *Qualified = Template.getAsQualifiedTemplateName())
1381 = Template.getAsOverloadedTemplate()) {
1387 DependentTemplateName *Dependent = Template.getAsDependentTemplateName();
1388 assert(Dependent && "Unknown template name kind?");
1391 mangleUnscopedTemplateName(Template);
1396 // <template-prefix> ::= <prefix> <template unqualified-name>
1397 template-param>
1399 // <template-template-param> ::= <template-param>
1405 // <template-template-param> ::= <template-param>
1416 /// Mangles a template name under the production <type>. Required for
1417 /// template template arguments.
1419 /// ::= <template-param>
1432 case TemplateName::Template:
1444 llvm_unreachable("can't mangle an overloaded template name as a <type>");
1458 // Substituted template parameters are mangled as the substituted
1459 // template. This will check for the substitution twice, which is
1470 // template <template <class> class T...> class A {
1471 // template <template <class> class U...> void foo(B<T,U> x...);
1515 // template <class T...> class A {
1516 // template <class U...> void foo(decltype(T::foo(U())) x...);
1521 // <unresolved-type> ::= <template-param>
1523 // ::= <template-template-param> <template-args>
1536 // sanctioned for a substituted template parameter, though.
1562 case TemplateName::Template:
1566 // If the base is a template template parameter, this is an
1568 assert(TD && "no template for template specialization type");
1578 llvm_unreachable("invalid base for a template specialization type");
1589 // template <template <class U> class T...> class A {
1590 // template <class U...> void foo(decltype(T<U>::foo) x...);
1884 // default template arguments) for any instantiation-dependent type.
1888 // - Default template arguments will need to be represented in the
1891 // - Conversions on non-type template arguments need to be expressed, since
1898 template specialization types that aren't
1899 // type aliases. We need to mangle the template arguments as written.
2294 // <type> ::= <template-param>
2299 // <type> ::= <template-param>
2302 // template <class T...> class A {
2303 // template <class U...> void foo(T(*)(U) x...);
2554 // FIXME: GCC does not appear to mangle the template arguments when
2555 // the template in question is a dependent template name. Should we
2598 // Dependently-scoped template types are nested if they have a prefix.
2607 // FIXME: GCC does not appear to mangle the template arguments when
2608 // the template in question is a dependent template name. Should we
2794 // ::= <template-param>
2797 // ::= sr <type> <unqualified-name> <template-args> # dependent template-id
2799 // ::= sZ <template-param> # size of a parameter pack
3059 // base-unresolved-name, where <template-args> are just tacked
3362 // template <unsigned N...> class A {
3363 // template <class U...> void foo(U (&x)[N]...);
3381 // base-unresolved-name, where <template-args> are just tacked
3654 // <template-args> ::= I <template-arg>+ E
3662 // <template-args> ::= I <template-arg>+ E
3671 // <template-args> ::= I <template-arg>+ E
3679 // <template-arg> ::= <type> # type or template
3682 // ::= J <template-arg>* E # argument pack
3688 llvm_unreachable("Cannot mangle NULL template argument");
3693 case TemplateArgument::Template:
3756 // <template-arg> ::= J <template-arg>* E
3766 // <template-param> ::= T_ # first template parameter
3803 assert(result && "no existing substitution for template name");
3836 bool CXXNameMangler::mangleSubstitution(TemplateName Template) {
3837 if (TemplateDecl *TD = Template.getAsTemplateDecl())
3840 Template = Context.getASTContext().getCanonicalTemplateName(Template);
3842 reinterpret_cast<uintptr_t>(Template.getAsVoidPointer()));
3865 /// Returns whether a given type is a template specialization of a given name
3893 template <std::size_t StrLen>
4001 void CXXNameMangler::addSubstitution(TemplateName Template) {
4002 if (TemplateDecl *TD = Template.getAsTemplateDecl())
4005 Template = Context.getASTContext().getCanonicalTemplateName(Template);
4006 addSubstitution(reinterpret_cast<uintptr_t>(Template.getAsVoidPointer()));