[libcxx-commits] [PATCH] D92229: [libc++] Update clang-format configuration
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 27 07:32:48 PST 2020
mclow.lists added a comment.
Has clang-format been improved enough that it will not "wreck" `std::less<void>`? Last time I tried it on that code, it pessimized it pretty thoroughly.
Code pasted here for reference:
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS less<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
};
#endif
Also, @missco wrote:
> I really like that we get clang-format to work. Live is simply to short to worry about formatting.
Writing is once, reading is many, many times.
Formatting that reveals the underlying structure of the code is a time-saver to future you (and others).
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