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

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Fri Aug 27 11:33:04 PDT 2021


On Fri, Aug 27, 2021 at 4:08 PM Renato Golin <rengolin at gmail.com> wrote:

> On Fri, 27 Aug 2021 at 15:03, Manuel Klimek <klimek at google.com> wrote:
>
>>  * Backwards compatibility is pursued, but can be broken in case of clear
>>> bugs
>>>
>>
>> Which I think is also tangential to the current RFC, and IMO should be
>> treated in a separate discussion if necessary (this is a fundamental
>> problem with how clang-format is designed).
>>
>
> Is this a fundamental problem with the code structure and maintainability
> or with the mindset of the main developers?
>

It's the algorithm - clang-format is a numerical optimizer of "beauty" -
any small changes can lead to the numerical outputs changing slightly,
which then leads to slight diffs in how code is formatted where two options
were previously considered very "similarly beautiful". It's not happening
super often, but it does happen.

I agree that we shouldn't introduce changes to formatting without good
reasons, but we can't restrict changes only to bug fixes - new features can
introduce changes, too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210827/3cce8547/attachment.html>


More information about the cfe-dev mailing list