Commit 5b33cc83 by Nathan Sidwell Committed by Nathan Sidwell

* name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.

From-SVN: r244334
parent eae63d78
2017-01-11 Nathan Sidwell <nathan@acm.org>
* name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
2017-01-11 Jakub Jelinek <jakub@redhat.com>
PR c++/78341
......
......@@ -2454,9 +2454,11 @@ push_overloaded_decl_1 (tree decl, int flags, bool is_friend)
|| (flags & PUSH_USING))
{
if (old && TREE_CODE (old) != OVERLOAD)
new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE));
/* Wrap the existing single decl in an overload. */
new_binding = ovl_cons (old, NULL_TREE);
else
new_binding = ovl_cons (decl, old);
new_binding = old;
new_binding = ovl_cons (decl, new_binding);
if (flags & PUSH_USING)
OVL_USED (new_binding) = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment