From patchwork Fri Apr 12 00:38:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathaniel Shead X-Patchwork-Id: 1922796 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BH66dUAl; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFyNh0b7jz1yYL for ; Fri, 12 Apr 2024 10:38:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9A1CB385842A for ; Fri, 12 Apr 2024 00:38:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 8FDBF3858D33 for ; Fri, 12 Apr 2024 00:38:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FDBF3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8FDBF3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1033 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712882302; cv=none; b=wLVUBRcl336rRvD2K/14Xp3RY+Lrm1jN++xjvRSrY96ENqbs/Up4UNIL/U8YuCR202MylSfPspy9dgHE6CVgHntsKdVfVuch0ADlffdt60pyrNsrUWl3hz76VPc8XhZA8pNjg+DKfgm0yLca9O8Rw73FD2RjsJWCAavV9ae6O14= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712882302; c=relaxed/simple; bh=jsha2Eini1CDEJieYzt28j8drOHz/oiRuVsiSWU4HEg=; h=DKIM-Signature:Message-ID:Date:From:To:Subject:MIME-Version; b=hDhxEI1iFG2jstXGCL6xtVdc9TkbD6BU+ahz5d903WZrmNvZ1hYXkEB8w2uNXOkQ3Ij3lKYf7wep6K20tOMNZEuD9ql82tyyBFbuBf7EO9eKC3FLGMYRBmeoIygL337M8KzyHvW6k26GHdNL4snxBW5lLSq8iVeCQST4lxdlQ8o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2a4df5d83c7so231122a91.0 for ; Thu, 11 Apr 2024 17:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712882298; x=1713487098; darn=gcc.gnu.org; h=content-disposition:mime-version:subject:cc:to:from:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=1zcUWlabx3x147CcRnbOEf9oLCojoQLRGNBCUpgD6Uc=; b=BH66dUAl1ZAUvSNT9NOXqSgMOYqG8NCzpH9LFgngJ2PyHOUL28utaAmdtOdeUN7qQv eqmNmUNjX1xRQoBIvmFRuPrXbEwtu1MENrs78IShuHCRsu1S3hnNK6hRuQXRyg3cgXG5 nYngLHfFVnRrWAVfZAZSnIh3WkP3XAZA+QddauzLiUxdpxdMaaUg7vgufMiBJw0nIUr6 6lTMoTsXXVL1QmaTyrLBBOEjDiioyEWtDtEgUQNMgyi03G7zhgAQ/R3x/JRX0qM386dS 0NpdSk46dFA+2ckr/guHoMRJk/MOgyvsDlZzul+dTFEDtcancvhHCHCVMvPICvTld8bQ hGWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712882298; x=1713487098; h=content-disposition:mime-version:subject:cc:to:from:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1zcUWlabx3x147CcRnbOEf9oLCojoQLRGNBCUpgD6Uc=; b=cj69HmuTSsEHxWrjudab7nqxHeTYh1yh5ztcSSVfyxXq8fOvuM16P2jgoJhY8IOwRV uTVWdId+kbsp3eTCuFD3hopL5ZfjLMClVfHoADeW+p+vo3wd1m3hUjExCBYhM2WWMvrT XiC9iJUrDGVRpiZywIgvbyMtPuB7N4UKE87A+HDqvNiIoa1Y2h5BF63RYjRISDHBQcSi pXFVRj4eRYCMcNB43BhJQdqIDCQcUyKUiZ0YvadcGo2KsXT0r+0BqUBHTkKdB51m4UPn GYFIYy/KS67Sl4kJJgoZv6CJBwHB60TjzvdfwDTBEYzV+XWePONA9Zn8+uxO5dmNlSyn lnNA== X-Gm-Message-State: AOJu0YzC40v1BIRYyYJkyOOIK03WJO5D/zcz9+km9icqgcpIu6vCm2R+ Ozv6wyO3Zam+cqfOYHifxZgTUeMx+FrkDfRJ8qYXvf+aA0j//A/S1N7uKw== X-Google-Smtp-Source: AGHT+IFSy8g5Ii4NuJEZ+oe++PFnbXkpb/9gJZzkMEcvMFmg/7ZcZQILu3Tt147V1S95LP2ZrJk6Qg== X-Received: by 2002:a17:90a:dc18:b0:2a2:dcee:f537 with SMTP id i24-20020a17090adc1800b002a2dceef537mr1170545pjv.33.1712882298309; Thu, 11 Apr 2024 17:38:18 -0700 (PDT) Received: from Thaum. (121-44-11-123.tpgi.com.au. [121.44.11.123]) by smtp.gmail.com with ESMTPSA id oj14-20020a17090b4d8e00b002a544263b43sm3359501pjb.28.2024.04.11.17.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 17:38:17 -0700 (PDT) Message-ID: <66188279.170a0220.e9635.a08c@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 12 Apr 2024 10:38:12 +1000 From: Nathaniel Shead To: gcc-patches@gcc.gnu.org Cc: Jason Merrill , Nathan Sidwell , Patrick Palka Subject: [PATCH 0/3] c++/modules: Fix some small issues with exported using-decls MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org 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