[cfe-dev] [RFC] Adding support for clang-format making further code modifying changes
Björn Schäpers via cfe-dev
cfe-dev at lists.llvm.org
Tue Aug 10 02:35:15 PDT 2021
Am 09.08.2021 um 22:52 schrieb Jon Chesterfield via cfe-dev:
> I would expect a formatting tool that introduces bugs to go out of favour
> extremely quickly and probably irreversibly once that was established to be by
> design.
>
> Header reordering feels like an edge case. Most code tries to keep them order
> independent anyway. Clang-format doesn't reorder between blocks of includes that
> are separated by an extra newline so there is an easy escape.
>
That is only true, if the IncludeBlocks option is not set to Regroup (which I
use), so there is another precedent of opt-in to potentially break something.
> I claim the current on by default for header order is the wrong default. I use
> the llvm format guide (without reading it) so had not realised this was the
> case. It probably means some non-zero number of developers will have tried
> clang-format, had it break their code, go back to what they had before.
>
> I don't mind if the tool can change the semantics of code provided it does not
> do so unless asked.
>
> Thanks for the RFC! Sorry to take the opposite position to what you'd prefer.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
More information about the cfe-dev
mailing list