When I wrote this check in r16-5811 I was thinking of checking if the
using-directive was imported, but this just checks if the target
namespace was imported, which is not what we want. We don't build deps
to see if the using-directive itself was imported, so just remove the
check. I haven't been able to come up with a testcase this breaks but
it still seems reasonable to adjust.
gcc/cp/ChangeLog:
* module.cc (module_state::write_using_directives): Correct
condition.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
have been walked earlier (PR c++/122915). But importers will
be able to just refer to the decl in that module unless it was
a partition anyway, so we don't have anything to do here. */
- if (!target_dep || target_dep->is_import ())
+ if (!target_dep)
{
gcc_checking_assert (DECL_MODULE_IMPORT_P (udir));
continue;