Message ID | 20230221120230.596966-29-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 s9csp1833490wrn; Tue, 21 Feb 2023 04:29:41 -0800 (PST) X-Google-Smtp-Source: AK7set/8ufzxzMx0URVUDdLSmY8W/sCTd0VvfbriG0kAzrqgIroFuM6/VQvOHktvtrfKIoB0bDga X-Received: by 2002:a17:906:22ce:b0:8b1:bab0:aa3d with SMTP id q14-20020a17090622ce00b008b1bab0aa3dmr15235060eja.8.1676982580925; Tue, 21 Feb 2023 04:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676982580; cv=none; d=google.com; s=arc-20160816; b=bYcV2WeIAXkTAh4mSoymaC6TAB8cmHSKUN/mdxPWumYoEvIvL2VZsqbEoC9QE3oQ2Z KHrM7diLbZHb2Q7XC5+WkbpSvTgf58UkauRDSD+AelScjPMcZ/Up8giW/leu5qK2LsmN jS3ArQTNx/65RCuftb0dQ1rMLiHEMHUIwW+VS59Hs3UAXWotalEbMDLIVS8HoiEEIbWf R2aZUsAM11RXyTlClsbIvgNLWrWp716gvVvGa0i70vbpt9qqfyjacok4kyvWcRk9gDBH Yeg94Z8aLmJHkDmW6h7Ma0q+k4Iep4fYQnMfpnh/NP4QKCFdNttU7e0ql//BpYXkwnF7 T7hQ== 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=X3fnMK/DzNtrqsGeeABjLKt6+sn0htuGaZiMaGUt0+Y=; b=dg641NpM/ZL8/Ptuk06dOSXH719Z+EbLPq3Y/QYZN6eVnriTwNKFQ/Y/oSL+yOy0CW Cd6dekKh71rcU00XpmSfcHwgQ9SIyrltbrpfkX+C8FC7OLJsgYzv23z1qTs76Cv+GOsw PPuv/eMmEvqfZ3rW0V6X8gDErNsS8IRQ8Wf/YKuP5/qwSOh9Uvk5P/7ibVCH6CcKP3kN mkutjzdrUp4SpKUG73m40D4WK/mHm7T3XyJppprQbSzdkSgEJzoTl5mUDtRpbn504z3+ VPQ/VCLMTRdenZFkw6eEK0z4vHYNwcrMT/FT1xbvetPI/Fb5yHCrqAh2UJIFXqoZGkyA 3Fpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=KPkD9FZX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id zy21-20020a17090734d500b008cd6f50c059si7421209ejb.669.2023.02.21.04.29.40 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:29:40 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=KPkD9FZX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 67B8C382E20B for <ouuuleilei@gmail.com>; Tue, 21 Feb 2023 12:11:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 969773844078 for <gcc-patches@gcc.gnu.org>; Tue, 21 Feb 2023 12:03:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 969773844078 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-wm1-x334.google.com with SMTP id p3-20020a05600c358300b003e206711347so2928288wmq.0 for <gcc-patches@gcc.gnu.org>; Tue, 21 Feb 2023 04:03:46 -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=X3fnMK/DzNtrqsGeeABjLKt6+sn0htuGaZiMaGUt0+Y=; b=KPkD9FZXmmQfDGCHgXXmaPEJCjjLSQHEUpSj3PLhJ6FBkMFw32liJlxZJBpLmKwBEo oCqHJe1OJdvfv3rI2m+aFadGy80HB0/YczpU1ZpuoG14eRjUiMuxrcICJV876/0r4/E5 OWIUsR7pTfOTv2y9xQvLwMkuFwbXIgWRDBgM5DQY52+F0fve7WqnAXB3Me2Co9Q2Xm/U mYOehQ0+zTdKE0f9ZMTRLlnRomC98RiqRzgsJHxCcRTzrHxO61X/bxvYW5AtgK4SKych H5lLG/sn/tBAbEiUIKezl51CjTu/9N5bzgJb53P+i1emvSWTrOisGjTtWuKzGhCC1uCk cgmQ== 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=X3fnMK/DzNtrqsGeeABjLKt6+sn0htuGaZiMaGUt0+Y=; b=UWFEu9tfCDEyTR+xoqsBigXJc7gcxYizxHSf7qGMfTdh7O1iup5gqSiIJfPcjVM4o5 JQC7BpJdgMg7dMuEBvd54JF5dKpf1dMG4gGdL439ELb5EvIIgbTyAgLZg3EVVclxdfw+ myJ5VjVvJ8/b1dL0lM9Q+l9KuvAFfYsga7bb5m2Uw7li9RRIqKn7qr6TVab8sBuQNcts +029XRyKCD94lH2QkEJCzL8sJkaFqJkli/AuniG/5GuLm5oh7JlyE2mvwfu0+FRwN6Z9 EEjEXzAJ2W9aRgLMq2+RZrCHV1w3O9fUwaFVbihHmd/aO5fdXbLte6ZC5G7QRXP/b8f4 /0Jw== X-Gm-Message-State: AO0yUKVqNDcrNoQXicoA1s0zj6VHLzFjZKbJfcRC0o27M61+vsbUrwYB Lzm6rMnxXHZYYsTRgeNPnKM3USHKOMhjAf9hZg== X-Received: by 2002:a05:600c:1d23:b0:3e7:f108:664c with SMTP id l35-20020a05600c1d2300b003e7f108664cmr1079967wms.40.1676981025992; Tue, 21 Feb 2023 04:03:45 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c15-20020adffb4f000000b002c55b0e6ef1sm5013811wrs.4.2023.02.21.04.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:03:45 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, David Faust <david.faust@oracle.com> Subject: [committed 028/103] gccrs: ast: dump: ArrayExpr Date: Tue, 21 Feb 2023 13:01:18 +0100 Message-Id: <20230221120230.596966-29-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=-15.0 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=ham 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?1758443686969737373?= X-GMAIL-MSGID: =?utf-8?q?1758443686969737373?= |
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: David Faust <david.faust@oracle.com>
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add dump code for ArrayExpr.
---
gcc/rust/ast/rust-ast-dump.cc | 32 ++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index ddc43b33512..91e540a1ee8 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -449,19 +449,43 @@ Dump::visit (GroupedExpr &expr) void Dump::visit (ArrayElemsValues &elems) -{} +{ + auto &vals = elems.get_values (); + if (vals.size () >= 1) + { + vals[0]->accept_vis (*this); + for (size_t i = 1; i < vals.size (); i++) + { + stream << ", "; + vals[i]->accept_vis (*this); + } + } +} void Dump::visit (ArrayElemsCopied &elems) -{} +{ + elems.get_elem_to_copy ()->accept_vis (*this); + stream << "; "; + elems.get_num_copies ()->accept_vis (*this); +} void Dump::visit (ArrayExpr &expr) -{} +{ + stream << '['; + expr.get_array_elems ()->accept_vis (*this); + stream << ']'; +} void Dump::visit (ArrayIndexExpr &expr) -{} +{ + expr.get_array_expr ()->accept_vis (*this); + stream << '['; + expr.get_index_expr ()->accept_vis (*this); + stream << ']'; +} void Dump::visit (TupleExpr &expr)