c++: Bogus error using namespace alias [PR91826]
authorNathan Sidwell <nathan@acm.org>
Mon, 27 Jan 2020 13:49:43 +0000 (05:49 -0800)
committerNathan Sidwell <nathan@acm.org>
Mon, 27 Jan 2020 14:33:35 +0000 (06:33 -0800)
commitfeaa1640b3543c7c3a1f3a788bc449a3638cb780
treec800bf7a4aad4d9513a68f2d5ef086581580df19
parentf261388f1a9f8ee4abfefff32bdfe6046914b7f2
c++: Bogus error using namespace alias [PR91826]

My changes to is_nested_namespace broke is_ancestor's use where a namespace
alias might be passed in.  This changes is_ancestor to look through the alias.

PR c++/91826
* name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias.
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/g++.dg/lookup/pr91826.C [new file with mode: 0644]