]> gcc.gnu.org Git - gcc.git/commit
c++: Kill DECL_HIDDEN_FRIEND_P
authorNathan Sidwell <nathan@acm.org>
Wed, 30 Sep 2020 13:23:15 +0000 (06:23 -0700)
committerNathan Sidwell <nathan@acm.org>
Wed, 30 Sep 2020 13:44:19 +0000 (06:44 -0700)
commit734eed68537a1a9eed43a4e409da527474fbf63d
tree17806417b9d49bec6da7b33c0bd6be086c864042
parent65167982efa4dbb96698d026e6d7e17acb513f0a
c++: Kill DECL_HIDDEN_FRIEND_P

Now hiddenness is managed by name-lookup, we no longer need DECL_HIDDEN_FRIEND_P.
This removes it.  Mainly by deleting its bookkeeping, but there are a couple of uses

1) two name lookups look at it to see if they found a hidden thing.
In one we have the OVERLOAD, so can record OVL_HIDDEN_P.  In the other
we're repeating a lookup that failed, but asking for hidden things --
so if that succeeds we know the thing was hidden.  (FWIW CWG recently
discussed whether template specializations and instantiations should
see such hidden templates anyway, there is compiler divergence.)

2) We had a confusing setting of KOENIG_P when building a
non-dependent call.  We don't repeat that lookup at instantiation time
anyway.

gcc/cp/
* cp-tree.h (struct lang_decl_fn): Remove hidden_friend_p.
(DECL_HIDDEN_FRIEND_P): Delete.
* call.c (add_function_candidate): Drop assert about anticipated
decl.
(build_new_op_1): Drop koenig lookup flagging for hidden friend.
* decl.c (duplicate_decls): Drop HIDDEN_FRIEND_P updating.
* name-lookup.c (do_pushdecl): Likewise.
(set_decl_namespace): Discover hiddenness from OVL_HIDDEN_P.
* pt.c (check_explicit_specialization): Record found_hidden
explicitly.
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/name-lookup.c
gcc/cp/pt.c
This page took 0.060479 seconds and 5 git commands to generate.