[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clang-format configuration discussion - pt 2


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 28 Nov 2023 10:55:14 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qO3hbXopS1Gt+KOsjIh1wP42OchnGb1nznd3sKCCNfs=; b=LkhMA4XQqcRQuZHHO6mB9erArfhAvihOv+86j9dZM3NicysdcWwOKuBrQ6zVtc78gEf986YaVs2dvhN+zrp01H6GpEkPN4nUX6QKtXvSt2fSTTYtCkkjQ/Q6CcNveoLnsEILoMtYG0tnnRmguUh5UpUCL3ZPZdmmpW9n4K70K/Jg+qYmh65Dbys5MZLBrjRsfuHXtjJ5MPprONTs+eZ8IEn+aZlbd8XRzBeQAKzLMpwbV+xKTPqOe4/shadJkZBt4FMgo++TNqDrhbpJ989CMqw4W8FeuRb7OhVMBc7eAKc23lMrWOQzUwIzIC+LcIr2pngZNMdB8EL7as0m+56JxQ==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qO3hbXopS1Gt+KOsjIh1wP42OchnGb1nznd3sKCCNfs=; b=Sn1xQ135rCNbxchqSm9OWolJ/7Ya5bRHnzDo8aUR9bD+DkRn4JhFZxKcCGlnPg6aueCGNp9Fm/4Rvf/3BLUiTFjoliFV1b7CJhkNeUqejI6LJqsZWCk2+z1hjgH6gblpesAOeacYSW3G2JCrRo3lPAswSPjH3w5SWQ45BimhSfzyYGyLAJZzUwDoF93WXjD3DhgF9Pzio4iGrQxTwBNlYCBTODJmHKy7Dd6uNJ6brOb35XVESaK1tY4W4CGNJTuv0uErXhcSkNdtiT+hN5KyxmctQtlqfKQAqOhzqWLUChPgm56HWSyjgLL2KJTlzVKpD3qy7ymykWqUQP/iFq/xbg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=VNJ8AZEM2SU0vOT9dsNCH6NU7d11HBPF1ZpHzSD2ny/Ym+0BVxJN97t0mOYS/EVGykx8ROBFKrHGsXzK+G2s2QN5CNr+a2e/+CLrhN8WjvmbhIqxJOXDqqr9Wxz3aSLYaWS13Xc/OOcZMAJEE4NXoGLpr1L/lamRSl1ulWmX1jE7vOC/t7HzaBDEgQXS62pnZHE2/52qgFbmJIss4ZkfcwbA6q1SPwVSICpPXD9lCnUQ7UBX+oDwbam65OLfX9i9fZu7wWER4RG1PT/OkfOroGKG1emVeCpSsoJmZqg3pqQWXqV07i8gJ8ueq5hMzW6BUk7V3no0vy1nkTqqIqbpGQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iG41Suz4j/+KedeBB1tApcqJRvHlyaAzwHrLH8mZ9p+tuv+l6HnVaBdy2w9pC+7qkXIKH5ScJo18vI2r+QJF2fX0JLgva8GLZQJ4exPc2NR93P2FBwgij1Ayw87RkVXeowCnl17i3xbVnYvN7q1JJq3aceg9R70SDOz6u7RNCPWWVr46CAchU/iYpZebUvtMCc4kOy8sg3EzSdCUvX+YXDEDR48ffG1BzlY7jT7ouS1Qlzjfo59mdF4yto7TAqop5Z6dZAWdJS1lsPiperx79mQMrZVKoQX87Ce4inlBv9rpcHBQ0l4O7g5bqv3td44iNV07RyOlOFo14WCW3L6gXA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <Michal.Orzel@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 28 Nov 2023 10:55:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaHhwDfni7SbjBtk6S7YLD/w4HebCJbICAgAAi9QCABIyNgIAAK/0AgAAEPICAAAbTgIABQ2eA
  • Thread-topic: Clang-format configuration discussion - pt 2


> On 27 Nov 2023, at 15:37, Luca Fancellu <Luca.Fancellu@xxxxxxx> wrote:
> 
> 
> 
>> On 27 Nov 2023, at 15:13, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> 
>> On 27.11.2023 15:58, Luca Fancellu wrote:
>>>> On 27 Nov 2023, at 12:20, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>> On 24.11.2023 15:52, Luca Fancellu wrote:
>>>>>> On 24 Nov 2023, at 12:47, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>>>> On 23.11.2023 15:47, Luca Fancellu wrote:
>>>>>>> Let’s continue the discussion about clang-format configuration, this is 
>>>>>>> part 2, previous discussions are:
>>>>>>> 
>>>>>>> - 
>>>>>>> https://lists.xenproject.org/archives/html/xen-devel/2023-11/msg00498.html
>>>>>>> 
>>>>>>> You can find the serie introducing clang-format here:
>>>>>>> https://patchwork.kernel.org/project/xen-devel/cover/20231031132304.2573924-1-luca.fancellu@xxxxxxx/
>>>>>>> and there is also a patch linked to my gitlab account where you can 
>>>>>>> find the output for the hypervisor code.
>>>>>>> 
>>>>>>> For a full list of configurables and to find the possible values for 
>>>>>>> them, please refer to this page:
>>>>>>> https://clang.llvm.org/docs/ClangFormatStyleOptions.html
>>>>>>> 
>>>>>>> --------------------------------------------------------------------------------------------------------------------------------------------------
>>>>>>> 
>>>>>>> Our coding style doesn’t mention anything about alignment, shall we add 
>>>>>>> a new section?
>>>>>>> I can send patches when we reach agreement on each of these rules.
>>>>>>> 
>>>>>>> 
>>>>>>> QualifierAlignment: Custom
>>>>>>> QualifierOrder: ['static', 'inline', 'const', 'volatile', 'type']
>>>>>>> 
>>>>>>> ---
>>>>>>> For “QualifierAlignment” I chose Custom in order to apply in 
>>>>>>> “QualifierOrder” an order for the
>>>>>>> qualifiers that match the current codebase, we could specify also 
>>>>>>> “Leave” in order to keep
>>>>>>> them as they are.
>>>>>> 
>>>>>> Where do attributes go in this sequence?
>>>>> 
>>>>> I think function declaration/definition and variables.
>>>> 
>>>> How does this relate to my question? I asked about the sequence of elements
>>>> listed for QualifierOrder:, where attributes don't appear at all right now.
>>> 
>>> Sorry, I misread your question, attributes are like invisible for the tool, 
>>> they can be placed wherever between
>>> each of the QualifierOrder items.
>> 
>> Hoho, one thing where various options are tolerated.

I realise now that my answer above is not fully correct, I wanted to say that 
the attributes are like invisible for the tool
only when dealing with this rule about ordering of the qualifiers.

On the other hand, yes, if the QualifierAlignment is “Leave”, clang-format 
won’t touch them.

Cheers,
Luca


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.