[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 11:41:31 +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=r/Ju3XQBulM1ZYSwXdZJQpIO+zOlCqsyn2j2xXCfZ5U=; b=l1lrk8SiEGHvzg1iO5ee3YOWC47julLawalkxgHHZ6I4NswyykE4St8CA21m926OVLLxfZ2H94VWMjFaErx/Y3i6SdN54238M59yLxLD4kXddqHKnA/aEuFrdZRzRQcbYAweOtjiykVSmOehv7T1tGs7rdD/dOYtusw1G/0ZFaufFdQdAJQcKInm3tdVVSqgFTo0Otwh1KOHN0ujyWLk6b1FbhdXLlBlcuRlCPq4RUjTYP6mI9FeuZeCd75BCRbNvnjUNBxqode4VhunwtKb9eSZOlg6x2Dq/svBG2b4zw5eVBq04gXh7XZcYi33M1bSHmfJBfpRz/w7psS7ncxzhg==
- 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=r/Ju3XQBulM1ZYSwXdZJQpIO+zOlCqsyn2j2xXCfZ5U=; b=ndB+Z3xoA6MSiLLDJi2TmChpOKMAcxa/oMVDG4W+idSkIPR53Ez+K8MQEwE6mYwp9T3ongGNlsTZyFTO0v/P4vypyV4MfJhgHqOqSfFuJ8GJ3aPIgvGbusyhkKu2GUyBKjHk1+B/SAH3MGzHaS+SZjKTXYmycXneFgl3CpJoXBsFQYyw4eCw3q4Sx1AMryNEFaFf51Sh0LJZDzStKwh4Kw/6+VvoDJ6phfhDEejiRoYyGt+ptS7oSpzQFCnrHZp8iXsPPVwq70qFxny6aQa0LbWj4gcrbLWa1pigHoe6r3Vt/mfQVChiuOCrKB5A5uziwEScxJy/erKC8C6z5BlYqw==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=WvlTgtgw2vJiLrjV0GC0LfciyYVr3aMc23ot4YEGtvAgkHieAEGt/d4COUIZEccSV4pk3ZdF4N/3j+/TUGGvpHeBbegS/rX5qZGsK+u3v0SVgGEfgzv7rCXImSAwHbym5hAQXdkAbArt0LGPFNvXMTAwzMmXfscmiwRtA91mfeVhra3nNq/5upd5A+y6NZJL9qWwYnp8t2X/AbojILtNAkZLIaCqisPUcEmlG0oczpjJ4ipa/YbtTB9Hi/maXAyrAEf9j2AoeJ5LwMipWnpTtYYkwW8pPFhmD4fAD+BWPgBMyWi3HBOgllaSTD+YTrkcCcXPiab1yZQqU3hOJQQ8HA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MrTrpxwt0Vcifmzcf6CswnH8VRx2lZY/fgBvpl0Jyu4gkCKYdzN+A7xlTup3HzzDt5VJQRdnHxV2Vz8AXxHVmgItK+s92je2wI2pT+X48RHi0FfIm86BQydqbVrEN0NW8WDjdKtUu0/FarVKPrhPkNZYa3ky1i7J9mKlS4qMZEsVTy0YtddRlJmgPVe4X3FbIXo/zyaxdwzMCUHrqz11ML/W01UsObj8a7oQ0s5NgjO3g3tJOJqDStMY7SBvosMEwrtJsiaBanPqcxDRNyK30Z/RxG7pD+4nsV8QeXV5XrCA6oJZxsgy7Ul4wFsQ8DtzmoSpwWMnXph9rS4MBg0nww==
- 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 11:41:49 +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/0AgAAEPICAAAbTgIABQ2eAgAAI84CAAAP8AA==
- Thread-topic: Clang-format configuration discussion - pt 2
> On 28 Nov 2023, at 11:27, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 28.11.2023 11:55, Luca Fancellu wrote:
>>
>>
>>> 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.
>
> Hmm - gets me back to wondering what "Alignment" in the name is about, when
> order of syntactical elements is affected.
Yes, probably QualifierAlignment is not the best name.
>
> Jan
|