name-lookup.h (cp_binding_level): Lose namespaces field.
authorNathan Sidwell <nathan@acm.org>
Fri, 2 Jun 2017 11:02:26 +0000 (11:02 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 2 Jun 2017 11:02:26 +0000 (11:02 +0000)
commitc957e9c05213b945d85506828c55c23a08eea090
tree403d78b8f25ea4a6278b4ce5e2c98da1d4a2562f
parent643a9684fadd71e0b89bc737e937e22fe621a4e7
name-lookup.h (cp_binding_level): Lose namespaces field.

* name-lookup.h (cp_binding_level): Lose namespaces field.
* name-lookup.c (add_decl_to_level): Chain namespaces on the names
list.
(suggest_alternatives_for): Adjust for namespace list.  Do
breadth-first search.
* decl2.c (collect_source_refs): Namespaces are on the regulr
list.
(collect_ada_namespace): Likewise.

* g++.dg/pr45330.C: Adjust.  Check breadth-firstness.

From-SVN: r248821
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr45330.C