[C++ PATCH] Using decls
authorNathan Sidwell <nathan@acm.org>
Tue, 21 May 2019 14:33:24 +0000 (14:33 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 21 May 2019 14:33:24 +0000 (14:33 +0000)
commit692af872fa50106af090e17cef92481207c33e89
tree2ef4422c1eeae7e57ee71a77da6262876febb002
parentf445f0f06cf6c5d44675a5c3aaeb54e7258a4e01
[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
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/using53.C
libcc1/ChangeLog
libcc1/libcp1plugin.cc