mbox series

[0/3] c++/modules: Fix some small issues with exported using-decls

Message ID 66188279.170a0220.e9635.a08c@mx.google.com
Headers show
Series c++/modules: Fix some small issues with exported using-decls | expand

Message

Nathaniel Shead April 12, 2024, 12:38 a.m. UTC
This patch series fixes a few issues with exported using-declarations that have
come up recently.

I was hoping to fix PR114683 and PR114685 as well, but the issues there look to
be much more involved and I'm not yet sure how to handle them.  They're
ultimately caused by using-declarations just inserting the value directly into
the given scope without any wrapping for non-functions, which means that
there's no indication of which using-decls in what scopes are exported.  I'd
hoped to try to repurpose the stat_hack machinery for this but after trying for
a while it doesn't seem to be appropriate.

Nathaniel Shead (3):
  c++: Only emit exported GMF usings [PR114600]
  c++: Propagate using decls from partitions
  c++: Propagate hidden flag on decls from partitions

 gcc/cp/module.cc                          |  6 +++++-
 gcc/cp/name-lookup.cc                     | 10 +++++-----
 gcc/testsuite/g++.dg/modules/using-14.C   | 14 ++++++++++++++
 gcc/testsuite/g++.dg/modules/using-15_a.C | 13 +++++++++++++
 gcc/testsuite/g++.dg/modules/using-15_b.C |  5 +++++
 gcc/testsuite/g++.dg/modules/using-15_c.C |  7 +++++++
 gcc/testsuite/g++.dg/modules/using-16_a.C | 11 +++++++++++
 gcc/testsuite/g++.dg/modules/using-16_b.C | 12 ++++++++++++
 gcc/testsuite/g++.dg/modules/using-16_c.C | 11 +++++++++++
 9 files changed, 83 insertions(+), 6 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/modules/using-14.C
 create mode 100644 gcc/testsuite/g++.dg/modules/using-15_a.C
 create mode 100644 gcc/testsuite/g++.dg/modules/using-15_b.C
 create mode 100644 gcc/testsuite/g++.dg/modules/using-15_c.C
 create mode 100644 gcc/testsuite/g++.dg/modules/using-16_a.C
 create mode 100644 gcc/testsuite/g++.dg/modules/using-16_b.C
 create mode 100644 gcc/testsuite/g++.dg/modules/using-16_c.C