public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7788] c++: tweak PR105006 fix Date: Wed, 23 Mar 2022 17:17:52 +0000 (GMT) [thread overview] Message-ID: <20220323171752.A1ABA3842435@sourceware.org> (raw) https://gcc.gnu.org/g:e8cd3edc0fc6c02a732dcecf519c22d835e5f422 commit r12-7788-ge8cd3edc0fc6c02a732dcecf519c22d835e5f422 Author: Jason Merrill <jason@redhat.com> Date: Wed Mar 23 12:22:20 2022 -0400 c++: tweak PR105006 fix Checking dependent_type_p avoids needing to walk the overloads in cases where it would not be possible to find a dependent using. PR c++/105006 gcc/cp/ChangeLog: * name-lookup.cc (lookup_using_decl): Check that scope is a dependent type before looking for dependent using. Diff: --- gcc/cp/name-lookup.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc index ea947fabb7e..3c7b626350f 100644 --- a/gcc/cp/name-lookup.cc +++ b/gcc/cp/name-lookup.cc @@ -5667,7 +5667,7 @@ lookup_using_decl (tree scope, name_lookup &lookup) /* If the lookup in the base contains a dependent using, this using is also dependent. */ - if (!dependent_p && lookup.value) + if (!dependent_p && lookup.value && dependent_type_p (scope)) { tree val = lookup.value; if (tree fns = maybe_get_fns (val))
reply other threads:[~2022-03-23 17:17 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220323171752.A1ABA3842435@sourceware.org \ --to=jason@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).