On 12/13/2016 12:49 PM, Nathan Sidwell wrote:
+/* Template information for an alias template type. */ +#define TYPE_ALIAS_TEMPLATE_INFO(NODE) \ + (DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \ + ? DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) \ + : NULL_TREE) + +/* If NODE is a specialization of an alias template, this accessor + returns the template info for the alias template. Otherwise behave + as TYPE_TEMPLATE_INFO. */ +#define TYPE_TEMPLATE_INFO_MAYBE_ALIAS(NODE) \ + (TYPE_ALIAS_P (NODE) && DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \ + ? TYPE_ALIAS_TEMPLATE_INFO (NODE) \ + : TYPE_TEMPLATE_INFO (NODE))
Looks like this is checking DECL_LANG_SPECIFIC twice again; we should be able to drop the check from TYPE_TEMPLATE_INFO_MAYBE_ALIAS.
/* An alias template name is never deduced. */ if (TYPE_ALIAS_P (arg)) arg = strip_typedefs (arg); - tree argvec = INNERMOST_TEMPLATE_ARGS (TYPE_TI_ARGS (arg)); + + tree tinfo = TYPE_TEMPLATE_INFO_MAYBE_ALIAS (arg);
You don't need _MAYBE_ALIAS here. And without it, we should be able to drop the strip_typedefs.
OK with those changes. Jason