+2018-01-31 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84092
+ * semantics.c (finish_qualified_id_expr): When handling an
+ UNBOUND_CLASS_TEMPLATE only adjust qualifying_class and expr.
+
2018-01-31 Marek Polacek <polacek@redhat.com>
PR c++/84138
if (template_p)
{
if (TREE_CODE (expr) == UNBOUND_CLASS_TEMPLATE)
- /* cp_parser_lookup_name thought we were looking for a type,
- but we're actually looking for a declaration. */
- expr = build_qualified_name (/*type*/NULL_TREE,
- TYPE_CONTEXT (expr),
- TYPE_IDENTIFIER (expr),
- /*template_p*/true);
+ {
+ /* cp_parser_lookup_name thought we were looking for a type,
+ but we're actually looking for a declaration. */
+ qualifying_class = TYPE_CONTEXT (expr);
+ expr = TYPE_IDENTIFIER (expr);
+ }
else
check_template_keyword (expr);
}