[PATCH] D31635: [clang-format] Added ReferenceAlignmentStyle option

MyDeveloperDay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 12:01:42 PDT 2020


MyDeveloperDay added a comment.

In D31635#2330075 <https://reviews.llvm.org/D31635#2330075>, @catskul wrote:

> In D31635#2329449 <https://reviews.llvm.org/D31635#2329449>, @mrexodia wrote:
>
>> In my opinion this patch should not be merged. I honestly don’t believe
>> this is a legitimate way of formatting code, so why make it possible at all?
>
> Mostly people want to migrate away from astyle without reviving formatting fights with their team will prevent adoption.
>
> There are many of us stuck with no good options until we're able to convince our teams that clang-format will maintain their preference for whatever reason that preference exists.

I am keen to welcome people coming from astyle without there being an blockers or reigniting religious debates and we've had requests for this before.

I personally am not going to block such a change but @mrexodia didn't you write this patch? Did you change your mind? If so @catskul you'd need to either take ownership this patch or reimplement.

For me the biggest reason I've seen is that the gcc STL seems to be left align reference and right align pointer, I'm not 100% sure if this is deliberate, I wonder if this is why @STL_MSFT is keen, as MS stl is clang-formatted, but if we don't support this then comparing the MS stl to the gcc stl would be made harder.

This is enough for me to say, add it, allow people to choose, but don't change any of the defaults. I don't think this adds complexity.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D31635/new/

https://reviews.llvm.org/D31635



More information about the llvm-commits mailing list