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

Re: Clang-format configuration discussion - pt 1


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Nov 2023 12:31:15 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=VciW1wMCTPrNcx+mUZ72APLBp/8hE3KE65xZRlN17nY=; b=JyihWftlm85Exk39xjzs9ZHN9ARWh17EGSKYgvYUpbU0yaFiHdzRIRB0wRxkrTu3Y8B8NRQoE439GJotW76ksO36qf1u5NKRQlhz270NyULCTrXhDajeJjHZz4WWBcefTq76LxndWJhMn6bE3dcgZvshxmHlhGBrqJB7481Qkp2HFUnPMMshTLZm5pdlzI/HN/7CSRRm0DoCmE4DFL6zVFXtBWgqFugirhla8dEKfiV3DHRH7qa0tQP66Ex+snSPOZBfs7M4vrXtjTGNP5hTuAySKw6N+69hJ76zuNJ3VEaVkDJ9597DSbAYP8MnaLsEmYNv+VHhNS9ynob+8whxxQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W0cAGeBtX/AR5mWyV+octlza6VmCmWWLeyFgUqf+yb1FDJKCOoIR7uA8rTTPD3UF/+z97yp+WbmrHekJw8VQRG9noh5rr+wz4Z/7pS89vtnk7ebdRXMnkh+/S3WT93kkj0j5BBC9+GRVtc2dB5HU/ozCvvWY96tIWXpqDLUQ3GBjhj5dOrCw5SXnTnwSkr083T62QWI2UlnBm2oFdi65eqW9q0pbN13DOVVn2VtDVydxUU2BPahyjvIKizAZKyUyk8nueu/2NysoOe2YD6fE58lFfTWu4mZCWnAmSYwgrBF2JiJ84xMBatBuZiRt0Rkmc2p6mVZsOhE5cZuvj3NmCg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.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: Mon, 13 Nov 2023 11:31:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.11.2023 10:53, Luca Fancellu wrote:
--------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> Standard: C++03
> 
> ---
> From the documentation: Parse and format C++ constructs compatible with this 
> standard.

Since I continue to be puzzled - iirc you said this is because of lack
of availability of "C99" as a value here. What's entirely unclear to
me is: How does this matter to a tool checking coding style (which is
largely about formatting, not any lexical or syntactical aspects)?

> This value is used also in Linux.

Considering how different the two styles are, I don't think this is
overly relevant.

--------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> AttributeMacros:
>   - '__init'
>   - '__exit'
>   - '__initdata'
>   - '__initconst'
>   - '__initconstrel'
>   - '__initdata_cf_clobber'
>   - '__initconst_cf_clobber'
>   - '__hwdom_init'
>   - '__hwdom_initdata'
>   - '__maybe_unused'
>   - '__packed'
>   - '__stdcall'
>   - '__vfp_aligned'
>   - '__alt_call_maybe_initdata'
>   - '__cacheline_aligned'
>   - '__ro_after_init'
>   - 'always_inline'
>   - 'noinline'
>   - 'noreturn'
>   - '__weak'
>   - '__inline__'
>   - '__attribute_const__'
>   - '__transparent__'
>   - '__used'
>   - '__must_check'
>   - '__kprobes'
> 
> ---
> A vector of strings that should be interpreted as attributes/qualifiers 
> instead of identifiers.
> I’ve tried to list all the attributes I’ve found.

Like above, the significance of having this list and needing to keep it
up-to-date is unclear to me. I guess the same also applies to a few
further settings down from here.

--------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> StatementMacros:
>   - 'PROGRESS'
>   - 'PROGRESS_VCPU'
>   - 'bitop'
>   - 'guest_bitop'
>   - 'testop'
>   - 'guest_testop'
>   - 'DEFINE_XEN_GUEST_HANDLE'
>   - '__DEFINE_XEN_GUEST_HANDLE'
>   - '___DEFINE_XEN_GUEST_HANDLE'
>   - 'presmp_initcall'
>   - '__initcall'
>   - '__exitcall'
> 
> ---
> A vector of macros that should be interpreted as complete statements.
> Typical macros are expressions, and require a semi-colon to be added; 
> sometimes this is not the case, and this allows
> to make clang-format aware of such cases.
> 
> While I was writing this, I’ve found that from ‘DEFINE_XEN_GUEST_HANDLE’ 
> until the end of the list, probably I
> shouldn’t list these entries because all of them end with semi-colon.

Ah, just wanted to ask. I agree that we'd better have here only items
which truly require an exception.

Jan



 


Rackspace

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