From 692af872fa50106af090e17cef92481207c33e89 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 21 May 2019 14:33:24 +0000 Subject: [C++ PATCH] Using decls https://gcc.gnu.org/ml/gcc-patches/2019-05/msg01396.html gcc/cp/ * name-lookup.h (struct cp_binding_level): Drop usings field. (finish_namespace_using_decl, finish_local_using_decl): Replace with ... (finish_nonmember_using_decl): ... this. * name-lookup.c (push_using_decl_1, push_using_decl): (do_nonmember_using_decl): ... here. Add INSERT_P arg. Reimplement. (validate_nonmember_using_decl, finish_namespace_using_decl) (finish_local_using_decl): Replace with ... (finish_nonmember_using_decl): ... this. Drop DECL parm. * parser.c (cp_parser_using_declaration): Don't do lookup here. * pt.c (tsubst_expr): Do not do using decl lookup here. gcc/testsuite/ * g++.dg/lookup/using53.C: Adjust diagnostic. libcc1/ * libcp1plugin.cc (plugin_add_using_decl): Use finish_nonmember_using_decl. From-SVN: r271467 --- libcc1/ChangeLog | 5 +++++ libcc1/libcp1plugin.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'libcc1') diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog index 376e3622410..e243e554d64 100644 --- a/libcc1/ChangeLog +++ b/libcc1/ChangeLog @@ -1,3 +1,8 @@ +2019-05-21 Nathan Sidwell + + * libcp1plugin.cc (plugin_add_using_decl): Use + finish_nonmember_using_decl. + 2019-05-20 Nathan Sidwell * libcp1plugin.cc (plugin_add_using_namespace): Call renamed diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index eed94662f85..d241ea1033d 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -1019,7 +1019,7 @@ plugin_add_using_decl (cc1_plugin::connection *, { /* We can't be at local scope. */ gcc_assert (at_namespace_scope_p ()); - finish_namespace_using_decl (target, tcontext, identifier); + finish_nonmember_using_decl (tcontext, identifier); } return 1; -- cgit v1.2.3