From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79885C4741F for ; Thu, 5 Nov 2020 07:08:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 320C920936 for ; Thu, 5 Nov 2020 07:08:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbgKEHIX (ORCPT ); Thu, 5 Nov 2020 02:08:23 -0500 Received: from smtprelay0074.hostedemail.com ([216.40.44.74]:58944 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726428AbgKEHIV (ORCPT ); Thu, 5 Nov 2020 02:08:21 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 142CC180A8450; Thu, 5 Nov 2020 07:08:20 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: bean75_200cdb0272c8 X-Filterd-Recvd-Size: 2929 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf14.hostedemail.com (Postfix) with ESMTPA; Thu, 5 Nov 2020 07:08:19 +0000 (UTC) Message-ID: <1418629172bac8fe75fee59f13e1192dd1ae5e4e.camel@perches.com> Subject: Re: [RFC PATCH] .clang-format: Remove conditional comments From: Joe Perches To: Miguel Ojeda , Nick Desaulniers Cc: clang-built-linux , LKML Date: Wed, 04 Nov 2020 23:08:18 -0800 In-Reply-To: References: <363325b4a85f094ba9cf06301dd022912ec79d03.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-11-05 at 07:44 +0100, Miguel Ojeda wrote: > There are a few important new features: https://clang.llvm.org/docs/ClangFormatStyleOptions.html >   - AlignConsecutiveMacros is probably one of the biggest one for the > kernel that we were missing so far. There's no control as to effective column nor sensible mechanism to avoid extremely long indents with a single exceptional entry. >   - IndentPPDirectives and Some yes, mostly no. AlignEscapedNewlines: Generally the kernel uses column 72 but there's not real consistency. clang-format doesn't have that option as far as I can tell. > Then there are a few others that pertain to us too: >   - SpaceBeforeSquareBrackets no >   - SpacesInConditionalStatement no >   - SpaceAfterLogicalNot no >   - SpaceInEmptyBlock no >   - IndentGotoLabels no > > Others are also worth checking to see if we can take advantage of them: >   - IncludeBlocks (and configuring IncludeCategories etc.) Might be worthwhile. It's different by maintainer preference though. Reverse Xmas tree is somewhat common in networking, (which I think is silly, but DaveM likes it). Some like alphabetic ordering, others by order of include. >   - StatementMacros Kernel is not c++ so this is irrelevant for gcc macro statement expressions. > Then there are others that are not related to us, but to be consistent > we would explicitly set them in the file. Finally, for extra points, > we could already document the new ones in LLVM 11 if any, for the > future, but that is optional. > > If no one is up for the task, I will eventually do it... :-) Enjoy...