[libcxx-commits] [PATCH] D92229: [libc++] Update clang-format configuration

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 27 08:15:08 PST 2020


curdeius added a comment.

I agree with @miscco, the advantages of consistent formatting outweigh the inconveniences caused by clang-format's shortcomings.
Comments like "clang-format on/off" are one of the solutions to the problem. Another being to force line breaks with empty trailing comments.

Regarding the strategy of adopting clang-format, the majority of projects I've seen cannot reformat everything at once.
First step is always to enforce `git clang-format` (but with macro-heavy code care must be taken because the context may accidentally become bigger than intended, at least for all the already released versions of clang-format, there are some improvements in master).
Apart from that, reformatting rarely touched files is another option (there's been a proposal to more or less automatically reformat files that haven't been touched for e.g. 6 months). But that's not a necessity IMO.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92229



More information about the libcxx-commits mailing list