Re: [PATCH] c++ modules: uninstantiated template friend class [PR104234]

2023-02-02 Thread Nathan Sidwell via Gcc-patches
That might be sufficient for this case, but temploid friends violate an assumption of the implementation -- namely that module A cannot create an entity that belongs in module B's symbol table. This causes a bunch of excitement, particularly around handling (well formed) duplicatd instantions.

[PATCH] c++ modules: uninstantiated template friend class [PR104234]

2023-01-25 Thread Patrick Palka via Gcc-patches
Here we're not clearing DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P for the instantiated/injected template friend class B, which confuses a later call to get_originating_module_decl for B. This patch fixes this by clearing the flag in tsubst_friend_class (as is already done for template friend