From patchwork Fri Dec 13 22:17:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36841 Received: (qmail 56441 invoked by alias); 13 Dec 2019 22:17:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 56361 invoked by uid 89); 13 Dec 2019 22:17:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=sk:EXTRACT, sk:Iaf449b, var_boolean, sk:iaf449b X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2019 22:17:14 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id C5A3020C15; Fri, 13 Dec 2019 17:17:12 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 7F30F201C2; Fri, 13 Dec 2019 17:17:08 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 58C6225BB4; Fri, 13 Dec 2019 17:17:08 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Fri, 13 Dec 2019 17:17:08 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Cc: Christian Biesinger , Pedro Alves Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Remove "boolean" and "var_boolean" checks from ARI X-Gerrit-Change-Id: Iaf449b51e8182ffa0b9ed25fe688e0ff64a07a67 X-Gerrit-Change-Number: 741 X-Gerrit-ChangeURL: X-Gerrit-Commit: a15a95ed265962027c7a8e0269bead6e5795006f In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, palves@redhat.com, cbiesinger@google.com, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191213221708.58C6225BB4@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/741 ...................................................................... Remove "boolean" and "var_boolean" checks from ARI The "boolean" and "var_boolean" checks from ARI seem only to generate false reports. Now that gdb is in C++, at least the "boolean" check seems unlikely to ever generate a true report. The "var_boolean" check likewise doesn't seem valuable any more -- presumably this refers to some ancient way of doing things in gdb, and isn't likely to find a bug in the future. Therefore, this patch removes these two checks. gdb/ChangeLog 2019-12-13 Tom Tromey * contrib/ari/gdb_ari.sh: Remove "boolean" and "var_boolean" checks. Change-Id: Iaf449b51e8182ffa0b9ed25fe688e0ff64a07a67 --- M gdb/ChangeLog M gdb/contrib/ari/gdb_ari.sh 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f3ee0ba..fea37ae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2019-12-13 Tom Tromey + * contrib/ari/gdb_ari.sh: Remove "boolean" and "var_boolean" + checks. + +2019-12-13 Tom Tromey + * gdbsupport/safe-iterator.h (class basic_safe_range) : No longer "const". diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh index 7202563..ee9f16a 100755 --- a/gdb/contrib/ari/gdb_ari.sh +++ b/gdb/contrib/ari/gdb_ari.sh @@ -1110,18 +1110,6 @@ fail("strnicmp") } -# Boolean expressions and conditionals - -BEGIN { doc["boolean"] = "\ -Do not use `boolean'\'', use `bool'\'' instead" - category["boolean"] = ari_regression -} -/(^|[^_[:alnum:]])boolean([^_[:alnum:]]|$)/ { - if (is_yacc_or_lex == 0) { - fail("boolean") - } -} - # Typedefs that are either redundant or can be reduced to `struct # type *''. # Must be placed before if assignment otherwise ARI exceptions @@ -1143,20 +1131,6 @@ fail("strlen d_name") } -BEGIN { doc["var_boolean"] = "\ -Replace var_boolean with add_setshow_boolean_cmd" - category["var_boolean"] = ari_regression - fix("var_boolean", "gdb/command.h", 1) - # fix only uses the last directory level - fix("var_boolean", "cli/cli-decode.c", 2) -} -/(^|[^_[:alnum:]])var_boolean([^_[:alnum:]]|$)/ { - if (($0 !~ /(^|[^_[:alnum:]])case *var_boolean:/) \ - && ($0 !~ /(^|[^_[:alnum:]])[=!]= *var_boolean/)) { - fail("var_boolean") - } -} - BEGIN { doc["generic_use_struct_convention"] = "\ Replace generic_use_struct_convention with nothing, \ EXTRACT_STRUCT_VALUE_ADDRESS is a predicate"