[cfe-dev] [RFC] Adding support for clang-format making further code modifying changes

Jon Chesterfield via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 9 13:52:18 PDT 2021

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.

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

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210809/e91987ae/attachment.html>

More information about the cfe-dev mailing list