[libcxx-commits] [PATCH] D124789: [libc++] Find a clang-format everybody is happy with

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 9 09:59:04 PDT 2022


philnik added a comment.

Personally I don't see much of a reason to stay close to the LLVM style. We already deviate quite a bit to make the code readable. The libc++ code base is quite different from most of the other LLVM projects. Is there any specific reason you want to stay close to the LLVM style @Mordante?



================
Comment at: libcxx/include/__ranges/lazy_split_view.h:81
+  _LIBCPP_HIDE_FROM_ABI lazy_split_view()
+    requires default_initializable<_View> && default_initializable<_Pattern>
+  = default;
----------------
Mordante wrote:
> This looks quite bad, but I expect it's a clang-format error. Does it become better with this change
No, clang-format still puts the `= default` on it's own line.


================
Comment at: libcxx/include/__ranges/lazy_split_view.h:93
+        // TODO(varconst): use `views::single` once it's implemented.
+        ,
+        __pattern_(ranges::single_view(std::move(__e))) {}
----------------
Mordante wrote:
> it looks like this needs manual intervention, but probably one time only.
putting the `,` at the usual place fixes this weird formatting.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124789



More information about the libcxx-commits mailing list