From: Alejandro Vallejo <alejandro.vallejo@cloud.com>
To: Luca Fancellu <Luca.Fancellu@arm.com>
Cc: "Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Bertrand Marquis" <Bertrand.Marquis@arm.com>,
"Michal Orzel" <Michal.Orzel@amd.com>,
"George Dunlap" <george.dunlap@citrix.com>,
"Wei Liu" <wl@xen.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: Clang-format configuration discussion - pt 1
Date: Tue, 14 Nov 2023 15:23:28 +0000 [thread overview]
Message-ID: <655390f2.050a0220.ff9eb.207c@mx.google.com> (raw)
In-Reply-To: <31A47242-54F9-42D4-B804-6D0A0392650C@arm.com>
Hi,
On Tue, Nov 14, 2023 at 02:59:35PM +0000, Luca Fancellu wrote:
>
>
> > On 13 Nov 2023, at 16:27, Jan Beulich <jbeulich@suse.com> wrote:
> >
> > On 13.11.2023 16:20, Luca Fancellu wrote:
> >>> On 13 Nov 2023, at 11:31, Jan Beulich <jbeulich@suse.com> wrote:
> >>> 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.
> >>
> >> Ok, maybe I understand your point, you are looking for a reason to declare this configurable instead
> >> of not specifying it at all?
> >
> > Not really, no. Here I was merely saying that with the styles being
> > sufficiently different, what Linux uses is probably not very significant
> > for our own decision.
> >
> >> If it’s that, from what I understand clang-format will use the default value if we don’t specify anything
> >> for this one, so it will take ‘Latest’. I think we should put a value for this one to fix it and don’t have
> >> surprises if that behaviour changes and seeing that also in Linux that value is fixed increased my
> >> confidence.
> >>
> >> However, if you feel that we should not specify it, I’ve done a test and not specifying it is not changing
> >> the current output. I can’t say that for a different clang-format version though or if changes happen in the
> >> future.
> >
> > It's fine to set values. All I'm saying is that at least I would prefer
> > if it was also clear what exact effect the setting of a value has,
> > especially when that does not really match the language we use in the
> > project.
On C, allegedly, none. It ought to control defaults for things like
SpaceBeforeCpp11BracedList, SpacesInAngles and other C++-specific things,
because the C++ language sticks syntactical extensions every other Tuesday.
Alas, whatever it does (there's no full list). I'd feel a lot more
comfortable knowing it won't change under our feet.
For reference, clang-format's docs state as an example:
```
c++03: latest:
vector<set<int> > x; vs. vector<set<int>> x;
```
>
> Yes I agree, I think Alejandro’s reply to this configurable reflects my thoughts about it.
>
> So if we all agree that we should set this parameter, do we all agree that it should be the
> value above?
>
> Do you have other concerns regarding this or the other parameters in this thread?
>
>
Cheers,
Alejandro
next prev parent reply other threads:[~2023-11-14 15:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 9:53 Clang-format configuration discussion - pt 1 Luca Fancellu
2023-11-13 11:31 ` Jan Beulich
2023-11-13 15:20 ` Luca Fancellu
2023-11-13 15:56 ` Alejandro Vallejo
2023-11-13 16:27 ` Jan Beulich
2023-11-14 14:59 ` Luca Fancellu
2023-11-14 15:23 ` Alejandro Vallejo [this message]
2023-11-14 15:59 ` Jan Beulich
2023-11-14 16:03 ` Luca Fancellu
2023-11-13 13:45 ` George Dunlap
2023-11-13 15:28 ` Luca Fancellu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=655390f2.050a0220.ff9eb.207c@mx.google.com \
--to=alejandro.vallejo@cloud.com \
--cc=Bertrand.Marquis@arm.com \
--cc=Luca.Fancellu@arm.com \
--cc=Michal.Orzel@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.