On 28.11.2023 11:55, Luca Fancellu wrote:
> 
> 
>> On 27 Nov 2023, at 15:37, Luca Fancellu <luca.fance...@arm.com> wrote:
>>
>>
>>
>>> On 27 Nov 2023, at 15:13, Jan Beulich <jbeul...@suse.com> wrote:
>>>
>>> On 27.11.2023 15:58, Luca Fancellu wrote:
>>>>> On 27 Nov 2023, at 12:20, Jan Beulich <jbeul...@suse.com> wrote:
>>>>> On 24.11.2023 15:52, Luca Fancellu wrote:
>>>>>>> On 24 Nov 2023, at 12:47, Jan Beulich <jbeul...@suse.com> 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.fance...@arm.com/
>>>>>>>> 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.

Jan

Reply via email to