From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MLIfGcLUi2m3iDQAWB0awg (envelope-from ) for ; Tue, 10 Feb 2026 20:00:50 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IWvqXl6y; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4F26D1E0BA; Tue, 10 Feb 2026 20:00:50 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2C2851E08D for ; Tue, 10 Feb 2026 20:00:49 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9A4C24BA23DF for ; Wed, 11 Feb 2026 01:00:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A4C24BA23DF Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IWvqXl6y 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 377734BA2E0D for ; Wed, 11 Feb 2026 01:00:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 377734BA2E0D Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 377734BA2E0D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770771623; cv=none; b=CMEempenQvLn3n4qEVNUhzUpp0XCkYZhucafDyEY9nC3DR89hdSn5kzAduzoMq7cav4srUUs8wyFRX8S9eU445um9Mw9kTRN0AwRjiaKy071a/ELuVvvxjB/NLdL7qSjturDdW6M2v957QI7KC8uHdItJgxFOHNbZpUrhBNiHps= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770771623; c=relaxed/simple; bh=UoczgLdOoiryms4xhGcMDZh7bca03UYxMFPMwK9g/0A=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Xs0d2t4lhBZOIb5doAoVUnJKgHQBeaLK+QA94S5DQbElhnGx0ow1BGeJkxTNYnbJL/Zj4RIImeg0JCYfH7wuRpIN3IkSh/axcoI7gllaWeKjIXhHQNmpmWRG3RFH6T5ts/WYRaPzvp99+kr4adDl36EpfyZCX01zOuxlZXExyEg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 377734BA2E0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770771622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5cZKDd+Lj6zpEPHFgFEeUcQhMSfXCA+w5KE0m6ZIjA=; b=IWvqXl6yGa8iekN8gWlsm/I7uClDmGvmPZdCb0gHmv4vQTx1uzMNUXH4fMow42xKdHm4lX klu2GoErpEeY5VYyJce9680cxylL6Wslis/OiUj7ZTlesGBla+AWZWI/3kTv9g0JTUi7A4 LePY77W+/P+HxZ/Rh0VYSodX04uTU/0= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-WQW8W8c6Nb6ERprrGlb_aA-1; Tue, 10 Feb 2026 20:00:18 -0500 X-MC-Unique: WQW8W8c6Nb6ERprrGlb_aA-1 X-Mimecast-MFC-AGG-ID: WQW8W8c6Nb6ERprrGlb_aA_1770771617 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3AA9F19560A7; Wed, 11 Feb 2026 01:00:17 +0000 (UTC) Received: from f42-mesa-1 (unknown [10.22.88.16]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 106E019560B0; Wed, 11 Feb 2026 01:00:15 +0000 (UTC) Date: Tue, 10 Feb 2026 18:00:13 -0700 From: Kevin Buettner To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v6] Add .clang-format Message-ID: <20260210180013.44cec281@f42-mesa-1> In-Reply-To: <20260205224851.1629635-1-tom@tromey.com> References: <20260205224851.1629635-1-tom@tromey.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: yLt1YdsQtv8-K7-TBQht7tafTyuFwfTvEPVYJmIcG1M_1770771617 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On Thu, 5 Feb 2026 15:48:49 -0700 Tom Tromey wrote: > This patch adds a .clang-format file to the gdb repository. > > The resulting reformatting is what I'd describe as "ok but not great". > There are a few variances from our normal style, some discussed in > comments in the file, and some in the bug. > > I've somewhat come around to the idea that some ugliness is > acceptable, particularly because I regularly see code that's already > ugly anyway -- either in formatting or along some other dimension. > > I don't know of a way to enforce a particular version. I have only > tried clang-format 18 with this particular file, though Kevin Buettner > reported trying 19-21 as well. I've documented this in the file. > > I used "AllowShortFunctionsOnASingleLine: InlineOnly" as previously > discussed. I feel that the spirit of the GNU style is that vertical > space is free, and we should use "None" here. (This goes against > something we previously decided on the list, though.) > > The file is in the root directory for ease of use. > > For the time being you should not bulk reformat files. I think we > should have a flag day for this, but at some later point. See the > earlier discussion for details. > > New in v4: > * Comment fixes > * Remove ForEachMacros - no longer correct > * Remove IncludeCategories - no longer correct > > New in v5: > * More fixes to the comments > > New in v6: > * Removed 'StatementMacros' setting, we're no longer using > PyObject_HEAD > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30098 > --- > .clang-format | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++ > .gitignore | 1 - > 2 files changed, 167 insertions(+), 1 deletion(-) > create mode 100644 .clang-format I was around back in the days when we used to use gnu-indent with a particular set of options. We all agreed that it wasn't perfect - in fact for many things it was downright ugly. But we also agreed that it was better than the alternative of having no code formatting tool available. I'm in favor of this going in. I'll give you an Approved-by in case you wish to use it. Kevin Approved-by: Kevin Buettner