Message ID | 20230221120230.596966-28-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 s9csp1828213wrn; Tue, 21 Feb 2023 04:15:48 -0800 (PST) X-Google-Smtp-Source: AK7set/pFoUUyCyOVSo0vth9UDCTCJTgUmbyF0+5XkVFXsLAXaqsvIuP67gnEAK5dxFVgyR7hdcU X-Received: by 2002:aa7:da04:0:b0:4ab:5ce9:9f83 with SMTP id r4-20020aa7da04000000b004ab5ce99f83mr3938382eds.23.1676981748310; Tue, 21 Feb 2023 04:15:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676981748; cv=none; d=google.com; s=arc-20160816; b=PsWvx4v4R5irJ+Ep5Em8D1Qu8t2pbF2uFa6M7L84WSOycTdpkQiiZN4/jYz3e91xjo IaHrZCs903H44gOpNtPQ0MFa2KtzE8fLpwd4VOuqaJ1ChZRgLBLWYofzox+bYH9YVAmD JT4Ws/pc6KsVWfDHyJqluvX+uQXHkeEcoIT6ZoR78V7zSi6Tw/Y+0fb/nKZw+OEv1cYd vnkNgXq1m7Vea1MjqC0unIk+I+6Kgh6vvq8XYSJnwpq++kyNN1OnQMfVh10ugXFWf6b0 v3KdZ+BmY2QEQ4pKGy9nF9368jAofYVzpOvBIrgg9NrU3KlOCBy2dRqqa94wUZ6EufKo AWYA== 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=9K7lfLyTafeqFOHlHDQCdciQa00C/3w0biaTALS9ap8=; b=a5XQKVov3YKGENmtUtAZgQdaM5W2qIluWe9nH+8wOBY4rTpIO2ykYEGzMDi/XUAYRX xoUqY6+NhE7046kew1uSuBrRbuXb1jqoBjCqzzASDWGuts6GpROxWZV4y0qxUetxFP/J sTmvs3Vm8AtxYjT4fT34h0UaXWv2+TK5PAGysrLQ3jUoeZ/tID6BtqKdTiaij3uDinnR LFqpjmbP8Z5Rwo3SMmqqpsVTFgSdc0oP+kRWk4mgn1bzewj74ja/8ik7y05jWC2X8cnA 99iZxlcxBC6YK1hF57GbtrPmMLBIzIajS8iLV9sgMPh5Dt47KmdfxyduxK9ogbEZf0Vo fgGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=QqnLr3jx; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m3-20020a50ef03000000b004acb6009aa3si19343728eds.617.2023.02.21.04.15.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:15:48 -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=QqnLr3jx; 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 BA214395BC76 for <ouuuleilei@gmail.com>; Tue, 21 Feb 2023 12:07:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id C56BF385B50A for <gcc-patches@gcc.gnu.org>; Tue, 21 Feb 2023 12:03:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C56BF385B50A 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-x336.google.com with SMTP id o14so3388110wms.1 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=9K7lfLyTafeqFOHlHDQCdciQa00C/3w0biaTALS9ap8=; b=QqnLr3jxRdw8/P56cFa6c7346rI5VO8VFNv8rSahHwe4lR9N/RKd/X5N1EOHL3PBp+ UbK7WSEh/ri30sGknENMo4bfeSMNLg6Och4S6Wj5W6coz/vuswSbnw3v/Os22TEr5zy5 67AUXjpWTDl+1gIYyyxjEH9rWMlBLaXrN+6HYKzfVrA5CDvlg3xiztOy/bCQt9bWgD9n 55Hpp0ZFQb4hp+RwovfEes10DrrkbNHjiwX1gKMyVK5mzbIUHz/OQTl+Dc7oJCINB5jW L7Cnr4hedPz5cV97/233DyXBPARptCyl1UykXt2tyKuwKefFdy9OZc7mu/kJOgbUt3BB PDxA== 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=9K7lfLyTafeqFOHlHDQCdciQa00C/3w0biaTALS9ap8=; b=lsHa1IgjK/F2+3SQMsvk7gEPxi4uA9XM3opXozjjQsiwKfprLDbaGrcXxGH1x39P+U ECINnIxucXLC+8egvIt53KbOATmu9w8v4f2izSRQ9bPdRBBZgLqX2Oqw7fFYS+CB0JPp /DCYPMW98n5GKhzNiuazS/Oz/Gfq1xYrRFjBgEdGqnHJqzk2Vmb9t4iK5BfzDpOhJ/ho Y9NWQvCvy/W3ZEtGJWJqR1jOAVPrVv1d81k0Ve6kIzsnEPtUyCmbUONn2TaiE9lsmJs0 xYiPrrL/VcxcluEX8baynBtRFKnHca3AbCiO4w031ZJRlyqUa7YWYOl+aBTaxY1SWYxV +gTA== X-Gm-Message-State: AO0yUKVf59K/Rw+HV+fnZqqAE2yJ8DCDcaeeO5IbEDLT93zn3xGJI9oY aagOW+rxldJerSG/CYcpLiUU8Sv4f/V8dLM6TA== X-Received: by 2002:a05:600c:4508:b0:3da:2500:e702 with SMTP id t8-20020a05600c450800b003da2500e702mr3377312wmo.32.1676981025320; 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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:03:44 -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 027/103] gccrs: ast: dump: ComparisonExpr and LazyBooleanExpr Date: Tue, 21 Feb 2023 13:01:17 +0100 Message-Id: <20230221120230.596966-28-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.4 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?1758442814011175271?= X-GMAIL-MSGID: =?utf-8?q?1758442814011175271?= |
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 dumps for ComparisonExpr and
LazyBooleanExpr.
---
gcc/rust/ast/rust-ast-dump.cc | 50 +++++++++++++++++++++++++++++++++--
1 file changed, 48 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 1ba84b8efa1..ddc43b33512 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -327,11 +327,57 @@ Dump::visit (ArithmeticOrLogicalExpr &expr) void Dump::visit (ComparisonExpr &expr) -{} +{ + auto op = ""; + switch (expr.get_expr_type ()) + { + case ComparisonOperator::EQUAL: + op = "=="; + break; + case ComparisonOperator::NOT_EQUAL: + op = "!="; + break; + + case ComparisonOperator::GREATER_THAN: + op = ">"; + break; + + case ComparisonOperator::LESS_THAN: + op = "<"; + break; + + case ComparisonOperator::GREATER_OR_EQUAL: + op = ">="; + break; + + case ComparisonOperator::LESS_OR_EQUAL: + op = "<="; + break; + } + + expr.get_left_expr ()->accept_vis (*this); + stream << " " << op << " "; + expr.get_right_expr ()->accept_vis (*this); +} void Dump::visit (LazyBooleanExpr &expr) -{} +{ + auto op = ""; + switch (expr.get_expr_type ()) + { + case LazyBooleanOperator::LOGICAL_AND: + op = "&&"; + break; + case LazyBooleanOperator::LOGICAL_OR: + op = "||"; + break; + } + + expr.get_left_expr ()->accept_vis (*this); + stream << " " << op << " "; + expr.get_right_expr ()->accept_vis (*this); +} void Dump::visit (TypeCastExpr &expr)