From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3eLzRYAgKCkUnwyvjpkhnvvnsl.jvtspihipnhpszv1yjl3hyl.vyn@flex--gprocida.bounces.google.com> Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by sourceware.org (Postfix) with ESMTPS id 686303847802 for ; Tue, 22 Jun 2021 10:33:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 686303847802 Received: by mail-qv1-xf49.google.com with SMTP id ez18-20020ad459120000b029020e62abfcbdso8633405qvb.16 for ; Tue, 22 Jun 2021 03:33:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=YOD9ZlDcGF5ddouFcIgSacFeCT6OeCZ4wp/gSHe/TTI=; b=H1PcUl+sUNNeFygFlpNJcC/PdmMeYyOlUsb6DYWIYvRzAKwR3i0aK5Sb2juVaDMykU 7tb+u/CjW3LVbJTjT/RGH2vOnelMIqetuhRWs3S/eZD5v3x09r7H485J/JM73dxeUs3p 1v0ASGqCwERXADoa7XpsCy8MYzztTnlXXo5NWzHKF9NuZlOXW4wicQRSS2rZxpyAg4Vs mVKNb6+nLVyDU8MYyr/8jG01L+pS16yPCzs+u7Z5qzYBEi1kRKIn3l61zWZVnEFpVX7A Jt62/2Vnn6i6NyEvvda3MASX8HGKlvkq8zbCWabYrFjCOcUWNUpNvZqsSAwUB81bsBAf WqDg== X-Gm-Message-State: AOAM530i5+sfwjH19ph3/CeE2GNrFaZMQwNFtthU18oSvey9yuDDPN4G UpXRXOZyFHQoBtMSJfpeFYyVfJCIkKDy15B7kCUr1D/mXK3qQy460LLxb+F4nJb5Sn/EX9G5NzK iWFiwCehw3TdS7Pg5t87Ct2ehFQFV+dWzzUbc325p7mfV/woZlW1EXozBvGFuxM8lebfPdhk= X-Google-Smtp-Source: ABdhPJy/RXLJGCpx+atlVCwaFp+IgDUahwVLzt6TNXowepX4QgwBZTxzYV7Cs1bJ/PQs9qTdBH0R5QJ6Ku5rMA== X-Received: from tef.lon.corp.google.com ([2a00:79e0:d:210:b7d7:a6fe:d167:7a5d]) (user=gprocida job=sendgmr) by 2002:ad4:5444:: with SMTP id h4mr24543397qvt.14.1624358008951; Tue, 22 Jun 2021 03:33:28 -0700 (PDT) Date: Tue, 22 Jun 2021 11:33:14 +0100 In-Reply-To: <20210622103318.478914-1-gprocida@google.com> Message-Id: <20210622103318.478914-3-gprocida@google.com> Mime-Version: 1.0 References: <20210611153319.778996-1-gprocida@google.com> <20210622103318.478914-1-gprocida@google.com> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog Subject: [PATCH v2 2/6] Tweak clang-format From: Giuliano Procida To: libabigail@sourceware.org Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com, maennich@google.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-22.2 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 10:33:30 -0000 The BTF / SCC code is being migrated out of Google source control into AOSP. This comes with the opportunity to migrate the style to be closer libabigail's. In the first instance it makes sense to just reformat it with clang-format. I've updated this as follows. AlignConsecutiveDeclarations: false - as this is closer on average to libgabigail code and looks nicer for the new code anyway AllowShort*: (true) - these in theory should make things closer to libabigail style but in practice don't appear make any difference Cpp11BracedListStyle: true - this seems to improve some initialiser syntax BinPackArguments: false - we already turn this off for parameters SpaceAfterCStyleCast: true - seems to be the libabigail style * .clang-format: Various tweaks for new BTF code. Signed-off-by: Giuliano Procida --- .clang-format | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 1b422dfb..d09d739a 100644 --- a/.clang-format +++ b/.clang-format @@ -2,17 +2,24 @@ --- BasedOnStyle: GNU Standard: c++11 -AlignConsecutiveDeclarations: true +AlignConsecutiveDeclarations: false +AllowShortBlocksOnASingleLine: Always +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortLambdasOnASingleLine: All AlwaysBreakAfterReturnType: All BreakConstructorInitializers: BeforeColon ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 +Cpp11BracedListStyle: true IndentWidth: 2 AlignAfterOpenBracket: Align +BinPackArguments: false BinPackParameters: false BreakStringLiterals: false PointerAlignment: Left SortUsingDeclarations: false +SpaceAfterCStyleCast: true SpaceBeforeParens: ControlStatements TabWidth: 8 UseTab: Always -- 2.32.0.288.g62a8d224e6-goog