[committed,051/103] gccrs: Add missing name resolution to Function type-path segments
Message ID | 20230221120230.596966-52-arthur.cohen@embecosm.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1836486wrn; Tue, 21 Feb 2023 04:36:08 -0800 (PST) X-Google-Smtp-Source: AK7set8F/y2ApuPe9JZgR5YoJ95wbyS7tuzHwTgZJCL7vIK4qpnv3vz77f9krr3sYTwaGLBoV5SA X-Received: by 2002:a05:6402:1383:b0:4af:59c0:d37d with SMTP id b3-20020a056402138300b004af59c0d37dmr354952edv.30.1676982968388; Tue, 21 Feb 2023 04:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676982968; cv=none; d=google.com; s=arc-20160816; b=B5Kpfz50DLEdYPvV1QkywN3zGZL+g/xSJ9TPZFFnD53p/uxUsxEfgkLEsPUUNzlWWV ksZneIs5toYpSVrt5fTgVt+r06sUjbJ5Q9NbdSzi9Voaq/Ev/bnBIu9H64MW8bhNwSyx H1+tmOyjpIW07xc7SDyzUJkiqYrwv+iNBRweLCsEaCvZO27xp9w4nMFE2h8FpeVxURJE ro0Yynav0DC+/NL6PgX6q/Sm4fGCN/AjNV1e900ZH+S3yYa1xRTSxEhgDPDvwwuYvX6y LOQYd48h/7sqZtnh2b6gYhU757BjdhTWPFTsBtpKnYmy5sx0ZamZfwGj8t6mhPX1DWIH Pb9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dmarc-filter :delivered-to; bh=cn21z6lBPZuI15CN1Av/jLF6sToO05XyZ1FrrIoqbYA=; b=lFDwLmm+rMfbdJ/db2kOi9fvd8ziAvh5BTmhg6otj5BqY7S4KYJxiRHmKb3tgn+E8W vwQGnutXSF6NxVp+f7q81HgSELLKFLritooI2O76fmAQ4mC1YNcTIxUCXOqe8eZyAn8P //wllHKd2sPgGSqYK3WDY2uRPbDUC5sb+Cu+2GJytcD6gxJ+mPd1v1/Dg8hQzFUAXY37 3Jrv+Xswat8dmvBO07OFAUMnoyzld3vLfesd3a5hgZkiXZvwikksWEB8P7M4b5A9ISAJ Ix3b7HY8n6TxHrmK6c80uGcUW74C6BrAubKQfwjRG64kIIaUXEADP63eTaicOzKSmYbb olgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=ew5I7TSe; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r18-20020aa7d592000000b004acbdaf456fsi20370591edq.291.2023.02.21.04.36.08 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:36:08 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=ew5I7TSe; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 885053837F22 for <ouuuleilei@gmail.com>; Tue, 21 Feb 2023 12:12:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 2960B383FDEE for <gcc-patches@gcc.gnu.org>; Tue, 21 Feb 2023 12:04:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2960B383FDEE Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x42f.google.com with SMTP id c12so4163533wrw.1 for <gcc-patches@gcc.gnu.org>; Tue, 21 Feb 2023 04:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=cn21z6lBPZuI15CN1Av/jLF6sToO05XyZ1FrrIoqbYA=; b=ew5I7TSeDbGa0prayJ4nMXpWO3/A5tCda1BtSPlIkJtEC/lqClMaflsEheypI7JBj5 ALpeWhcliW6RnfHcqwU7u3wRuHRQ8RDknZgjwBZNvpa6oqLHofNCGy4l9Xgwp2RLZS2t vhVfb33ZoQJKWDVhbADzoosxbHC/B8bN34gFzHRToNoYNsZgv1cFd2E0HjmNzKdSWw8N E19bQ8hXzON5Q05z9ozoBRte/PE9NWcxL9V31tvq2Ad52KGCzpMVC/2lG1DDYeUS5LJp A0VZzzonT2FquxBhcEFU0udd64rpos4PlIfNedVJynQFIJipoT7HI82X8Y9kQZHTi+oT G3qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cn21z6lBPZuI15CN1Av/jLF6sToO05XyZ1FrrIoqbYA=; b=nUHhyIuYFT0DK/6XOnBY2Pa2fThh8PDiJ/qEGoDI9ONHhcanqcVTnnUw0mMY4aWjHA WmAT7qwBulW6dtdG6Mf+1hfxi6xl8JMt7HiRkjFw57/5fGzMf3IcjMtz3t/OlpC0o93j TPEOUnKCmx3VOljTWp7B13HF7kMaxzYepiyqqQiNpnWP9palnb96Qcycjpo2bow/sxEJ DoZwK4v6ozbo0xePESzzEmV/VNQXWq1x0smtgKDp/CUuOG4qY3BZ8UfkjdOufaIbtIiv HKNsbAr3TbO01K4RvkVi/IZdudbRTQgJS6UCWrNnc1mn1iG4vR+CFvXfwv2/6BUiqZAA 5w5g== X-Gm-Message-State: AO0yUKWuzOz7S1CT+smmE2C921AN9F36lhSY7m0PpmNPydOfTMou1oKj nfYRhmPfgo4pMLZNbPuI8SUFhtBl8EYarsKkgg== X-Received: by 2002:a5d:6b83:0:b0:2c5:77de:426b with SMTP id n3-20020a5d6b83000000b002c577de426bmr3461385wrx.60.1676981044769; Tue, 21 Feb 2023 04:04:04 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c15-20020adffb4f000000b002c55b0e6ef1sm5013811wrs.4.2023.02.21.04.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:04:04 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Philip Herron <philip.herron@embecosm.com> Subject: [committed 051/103] gccrs: Add missing name resolution to Function type-path segments Date: Tue, 21 Feb 2023 13:01:41 +0100 Message-Id: <20230221120230.596966-52-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221120230.596966-1-arthur.cohen@embecosm.com> References: <20230221120230.596966-1-arthur.cohen@embecosm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable 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.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758444093221679462?= X-GMAIL-MSGID: =?utf-8?q?1758444093221679462?= |
Series |
[committed,001/103] gccrs: Fix missing dead code analysis ICE on local enum definition
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Arthur Cohen
Feb. 21, 2023, 12:01 p.m. UTC
From: Philip Herron <philip.herron@embecosm.com>
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Add missing handling of
function case.
---
gcc/rust/resolve/rust-ast-resolve-type.cc | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc index d227b8b539a..e5c712aba07 100644 --- a/gcc/rust/resolve/rust-ast-resolve-type.cc +++ b/gcc/rust/resolve/rust-ast-resolve-type.cc @@ -149,7 +149,20 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id) break; case AST::TypePathSegment::SegmentType::FUNCTION: - gcc_unreachable (); + AST::TypePathSegmentFunction *fnseg + = static_cast<AST::TypePathSegmentFunction *> (segment.get ()); + + AST::TypePathFunction &fn = fnseg->get_type_path_function (); + for (auto ¶m : fn.get_params ()) + { + ResolveType::go (param.get ()); + } + + if (fn.has_return_type ()) + { + ResolveType::go (fn.get_return_type ().get ()); + } + break; }