From patchwork Thu Jul 15 23:34:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 1505941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=KHPRR7ou; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GQrMr3Kdpz9sWd for ; Fri, 16 Jul 2021 09:35:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BDDCF398D43D for ; Thu, 15 Jul 2021 23:35:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDDCF398D43D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1626392132; bh=OKwnM7jgDzUJMiDop4+MKmGcxM6zoXR2rm9etL39dz4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KHPRR7oup7aKNqkJgl683EElVbWJlSO7XSue8rlT7Fepgf2YOjwp0Hg3khH9voCrR skQf31ZUBlSIE5s7vpkCWHmtM72VLsjEIWWH9yclBV9BQGIllHEOQqxmftr2kYDZ+j rjjHGL6qJDgC9iH51UDF+p4iBMiBjec/hNtFOEVo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id D9D32385C40F for ; Thu, 15 Jul 2021 23:34:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9D32385C40F Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-288-JO6KokwGMz-7oJxG77BJNw-1; Thu, 15 Jul 2021 19:34:48 -0400 X-MC-Unique: JO6KokwGMz-7oJxG77BJNw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 771BFA0CAB for ; Thu, 15 Jul 2021 23:34:47 +0000 (UTC) Received: from t14s.localdomain.com (ovpn-112-158.phx2.redhat.com [10.3.112.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F0A95D9C6; Thu, 15 Jul 2021 23:34:46 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [committed] analyzer: fix const-correctness of various is_a_helper Date: Thu, 15 Jul 2021 19:34:43 -0400 Message-Id: <20210715233443.14587-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as c031ea2782a1873eee5ba82fb114cd87ff831412. gcc/analyzer/ChangeLog: * svalue.h (is_a_helper ::test): Make param and template param const. (is_a_helper ::test): Likewise. (is_a_helper ::test): Likewise. (is_a_helper ::test): Likewise. Signed-off-by: David Malcolm --- gcc/analyzer/svalue.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/analyzer/svalue.h b/gcc/analyzer/svalue.h index 54b97f8617f..20d7cf8f751 100644 --- a/gcc/analyzer/svalue.h +++ b/gcc/analyzer/svalue.h @@ -1063,7 +1063,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_PLACEHOLDER; } @@ -1165,7 +1165,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_WIDENING; } @@ -1266,7 +1266,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_COMPOUND; } @@ -1366,7 +1366,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_CONJURED; }