From patchwork Fri Jun 11 15:33:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 43831 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 49A23398B150 for ; Fri, 11 Jun 2021 15:34:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49A23398B150 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623425660; bh=8tX5oOTxgJNV/iMUmCtv5gRO64GPMVHM1X4pClyfsmM=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=GAntACuibtOdWxQwAwk/Zn8h8uM9eW8KetD4sOVIoJaueAPpZSZrt/L5gLb9l1QQp 4SgurShFxJz4KhJqLF/nM1+P9QDR87RrCNE76YJFW8cONnxhnk3tgCuoKvRP3AvDgz A7X3+oNPKPcuFVwiPpY+QDyBvKBGsie2w8XogTBE= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-wm1-x349.google.com (mail-wm1-x349.google.com [IPv6:2a00:1450:4864:20::349]) by sourceware.org (Postfix) with ESMTPS id E1FD038618BB for ; Fri, 11 Jun 2021 15:34:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E1FD038618BB Received: by mail-wm1-x349.google.com with SMTP id r4-20020a7bc0840000b02901b7cb5713ecso2432078wmh.1 for ; Fri, 11 Jun 2021 08:34:15 -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=8tX5oOTxgJNV/iMUmCtv5gRO64GPMVHM1X4pClyfsmM=; b=o+f22j9x6YtRHHEuh69MaeMh1W/b4Q41kWWUmci4pTZZGeXscj6KadjZX0bNXApfTr TK0Hh3shF7qXaihbdx1HVrX0+7UGMLG3Mo8/+sT/QgBBsyF/ZV0baFdNLxRLymsLnd7T o772X8TBYH6wTYFfamH9dyFEs0lfvRbvbaBJkZEEv3NOisW9PCA/cSycG2hush1fd6V1 /t3A3ATz/4BFo4c/JWgkjTmgX+bVowmx0FfLW53ALENQmWzwF4PiTfM/EqGq1bP6fVoH 4kTUbGCbeRkQ175DO8hUXqwqrE2r9i0lly31YcK2YtKbN1N2tN/YcaPgaH/o1PfqI645 GoAg== X-Gm-Message-State: AOAM5319sdY5xFvsRJGSvCFeqvhHSB02X2kahyUvwHN8lGoCDkv0/gtQ K0czGYnQ2RwfhfL6b2Ko0ELMhiBOckfvUGsJHv+BGhTJfxHFPcP8/iuH63R3nNF0Zr1B110GlcC QB0UNq67+BOhs6sJpwz0Hz9ztR01g0IPHqvrakHd2OluP1nVpwCVgUtQBTvebsbvCj29ayzA= X-Google-Smtp-Source: ABdhPJzw1Sf6Tgqlz+9ic2WbTf6THr4JHnFT0hRANrB9vReMdFxRvfW4U2WuLLc9qFqgGE56me4Q8/oZVGDrTQ== X-Received: from tef.lon.corp.google.com ([2a00:79e0:d:210:c264:c1f9:cf3c:2c0b]) (user=gprocida job=sendgmr) by 2002:a1c:1b4c:: with SMTP id b73mr20590785wmb.57.1623425654823; Fri, 11 Jun 2021 08:34:14 -0700 (PDT) Date: Fri, 11 Jun 2021 16:33:14 +0100 In-Reply-To: <20210611153319.778996-1-gprocida@google.com> Message-Id: <20210611153319.778996-2-gprocida@google.com> Mime-Version: 1.0 References: <20210611153319.778996-1-gprocida@google.com> X-Mailer: git-send-email 2.32.0.272.g935e593368-goog Subject: [PATCH 1/6] Tweak clang-format To: libabigail@sourceware.org X-Spam-Status: No, score=-22.8 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-Patchwork-Original-From: Giuliano Procida via Libabigail From: Giuliano Procida Reply-To: Giuliano Procida Cc: maennich@google.com, kernel-team@android.com, teguiani@android.com Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" 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