From 848bf88da828bfa5467a7d07eb81f946f4937b5c Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 16 May 2017 13:15:53 +0000 Subject: cp-tree.h (OVL_FIRST, OVL_NAME): New. * cp-tree.h (OVL_FIRST, OVL_NAME): New. (ovl_first): New. * constexpr.c (function_concept_check): Use OVL_FIRST. * cvt.c (build_expr_type_conversion): Likewise. * decl.c (poplevel, grokdeclarator): Use OVL_NAME. * decl2.c (mark_used): Use OVL_FIRST. * error.c (dump_decl): Use OVL_FIRST, OVL_NAME. (dump_expr, location_of): Use OVL_FIRST. * friend.c (do_friend): Use OVL_NAME. * init.c (build_offset_ref): Use OVL_FIRST. * mangle.c (write_member_name): Likewise. (write_expression): Use OVL_NAME. * method.c (strip_inheriting_ctors): Use OVL_FIRST. * name-lookup.c (pushdecl_class_level): Use OVL_NAME. * pt.c (check_explicit_specialization): Use OVL_FIRST. (check_template_shadow): Likewise. (tsubst_template_args): Use OVL_NAME. (tsubst_baselink): Use OVL_FIRST. * semantics.c (perform_koenig_lookup): Use OVL_NAME. * tree.c (get_first_fn): Use OVL_FIRST. * typeck.c (finish_class_member_access_expr): Use OVL_NAME. (cp_build_addr_expr_1): Use OVL_FIRST. From-SVN: r248108 --- gcc/cp/typeck.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gcc/cp/typeck.c') diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 6bc88a9..6f15c9b 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -2764,10 +2764,8 @@ finish_class_member_access_expr (cp_expr object, tree name, bool template_p, template_args = TREE_OPERAND (name, 1); name = TREE_OPERAND (name, 0); - if (TREE_CODE (name) == OVERLOAD) - name = DECL_NAME (get_first_fn (name)); - else if (DECL_P (name)) - name = DECL_NAME (name); + if (!identifier_p (name)) + name = OVL_NAME (name); } if (scope) @@ -5746,7 +5744,7 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain) /* Fall through. */ case OVERLOAD: - arg = OVL_CURRENT (arg); + arg = OVL_FIRST (arg); break; case OFFSET_REF: -- cgit v1.1