[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 07/11] qapi/gen: run C code through clang-format, if possi
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH v4 07/11] qapi/gen: run C code through clang-format, if possible |
Date: |
Mon, 6 Mar 2023 22:29:39 +0400 |
Hi
On Mon, Mar 6, 2023 at 8:06 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Mon, 6 Mar 2023 at 12:33, <marcandre.lureau@redhat.com> wrote:
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Make the resulting code even prettier, if possible.
>
> This seems to be a bit short on rationale. This is generated
> code, so in general nobody is going to be reading it, and
> running clang-format on it every time we generate code feels
> like it would be a bit of a waste of cycles...
With this reasoning, why do we care about indentation of generated code at all?
I think it still makes sense, because you have many reasons to read
through it eventually, and making it a bit more friendly helps.
Whether it is a waste of time or not, hmm. Indeed, my experience with
clang-format has teached me that it is not the most CPU-friendly
sometimes...
Perhaps the solution is only to enable formatting when debugging is
enabled, for example?
--
Marc-André Lureau
- Re: [PATCH v4 04/11] osdep: implement qemu_socketpair() for win32, (continued)
[PATCH v4 08/11] qmp: add 'get-win32-socket', marcandre . lureau, 2023/03/06
[PATCH v4 11/11] QMP/HMP: only actually implement getfd on CONFIG_POSIX, marcandre . lureau, 2023/03/06
[PATCH v4 09/11] libqtest: make qtest_qmp_add_client work on win32, marcandre . lureau, 2023/03/06
[PATCH v4 10/11] qtest: enable vnc-display test on win32, marcandre . lureau, 2023/03/06