We were checking TYPE_NAME and then copying it if not null. Just copy
it, and then see if we got null.
* pt.c (lookup_template_class_1): Remove unnecessary else by
simply grabbing TYPE_NAME earlier.
2020-05-14 Nathan Sidwell <nathan@acm.org>
+ * pt.c (lookup_template_class_1): Remove unnecessary else by
+ simply grabbing TYPE_NAME earlier.
+
* pt.c (push_template_decl_real): Adjust friend pushing logic.
Reinit template type.
/* If we called start_enum or pushtag above, this information
will already be set up. */
- if (!TYPE_NAME (t))
+ type_decl = TYPE_NAME (t);
+ if (!type_decl)
{
TYPE_CONTEXT (t) = FROB_CONTEXT (context);
DECL_SOURCE_LOCATION (type_decl)
= DECL_SOURCE_LOCATION (TYPE_STUB_DECL (template_type));
}
- else
- type_decl = TYPE_NAME (t);
if (CLASS_TYPE_P (template_type))
{