diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-05-16 13:15:53 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-05-16 13:15:53 +0000 |
commit | 848bf88da828bfa5467a7d07eb81f946f4937b5c (patch) | |
tree | 7e49b3d679eccb83b4af299eb173295feeba98ac /gcc/cp/typeck.c | |
parent | ba1a69079ff61eea6ab6fcf4c2784ef6221c12da (diff) | |
download | gcc-848bf88da828bfa5467a7d07eb81f946f4937b5c.zip gcc-848bf88da828bfa5467a7d07eb81f946f4937b5c.tar.gz gcc-848bf88da828bfa5467a7d07eb81f946f4937b5c.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r-- | gcc/cp/typeck.c | 8 |
1 files changed, 3 insertions, 5 deletions
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: |