[libcxx-commits] [PATCH] D99691: [libcxx] adjusts formatting rules

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 1 15:07:30 PDT 2021


cjdb marked 9 inline comments as done.
cjdb added a comment.

In D99691#2665215 <https://reviews.llvm.org/D99691#2665215>, @ldionne wrote:

> I think this is great, with nitpicks. I've actually been thinking that we should make the clang-format CI job a hard-failure, as that would greatly reduce the room for formatting related comments, which are often (although not always) a distraction.

Is that something I can do in this commit?

> Even though we all have pet peeves and opinions w.r.t. formatting, I think we'll all be more productive and will have a easier time collaborating if we just agree on one style guide that can be applied mechanically. It's hard for everyone to make the transition, myself included (I love my style!), but I think it's the pragmatic way forward.

Please. I find comments asking for `> >` to be turned into `>>`, and friends, exhausting.



================
Comment at: libcxx/.clang-format:16
+BreakBeforeConceptDeclarations: true
+IndentRequires: false
 ---
----------------
ldionne wrote:
> cjdb wrote:
> > Quuxplusone wrote:
> > > Please set "IndentRequires" to true. Or at least, regardless of what tools you run locally to format your code, please ensure that what gets checked in looks like
> > > 
> > > ```
> > > template <class _Tp>
> > >   requires foo<_Tp>
> > > inline constexpr bar(_Tp) {
> > > ```
> > > and not
> > > ```
> > > template <class _Tp>
> > > requires foo<_Tp>
> > > inline constexpr bar(_Tp) {
> > > ```
> > The current libc++ style is as if `IndentRequires` is `false` and I'd prefer to keep it that way; unless @ldionne asks it to be changed.
> Frankly, I have no real opinion about this. I think we should go with whatever we think is most readable without concern for how existing code has been written. I'd leave it to @cjdb to decide, since you've been writing pretty much all the concepts we have so far. Just pick what you think is most readable.
`IndentRequires: false` shall remain then.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99691



More information about the libcxx-commits mailing list