On Mon, 6 Mar 2023 at 18:29, Marc-André Lureau <marcandre.lur...@gmail.com> wrote: > > Hi > > On Mon, Mar 6, 2023 at 8:06 PM Peter Maydell <peter.mayd...@linaro.org> wrote: > > > > On Mon, 6 Mar 2023 at 12:33, <marcandre.lur...@redhat.com> wrote: > > > > > > From: Marc-André Lureau <marcandre.lur...@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.
Yeah, sometimes you have to read through it, so not printing it all one one long line is helpful. But it's a tradeoff -- "make it basically kinda readable by tracking indent level" is easy and quick; running the whole output through a pretty-printer is more expensive and doesn't improve the output by very much over what we already have. (If I'm wrong about that last part, it would be useful for the commit message to give an example of currently unreadable output that clang-format makes more usable.) thanks -- PMM