[libcxx-commits] [PATCH] D153140: [libc++][NFC] Apply clang-format on large parts of the code base
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 18 15:38:04 PDT 2023
philnik added inline comments.
================
Comment at: libcxx/include/__concepts/copyable.h:27
-template<class _Tp>
+// clang-format off
+template <class _Tp>
----------------
ldionne wrote:
> For some concepts where I judged that alignment was really helping readability, I added `on/off` annotations. In other places I didn't because I felt like readability was less affected, but this is arguably a judgement call.
I'm fine with having a few `// clang-format on/off` in the code. clang-format is for the 99% where there isn't a readability problem and we just need //some// formatting decision.
================
Comment at: libcxx/include/__type_traits/decay.h:49
+ __add_pointer_t<__remove_extent_t<_Up> >,
+ typename conditional< is_function<_Up>::value, typename add_pointer<_Up>::type, __remove_cv_t<_Up> >::type >::type
+ type;
----------------
================
Comment at: libcxx/include/__type_traits/invoke.h:355
- using type = __conditional_t<
- _IsNotSame<_Result, __nat>::value,
- __conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
- false_type>;
+ using type = __conditional_t< _IsNotSame<_Result, __nat>::value,
+ __conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
----------------
Mordante wrote:
> ldionne wrote:
> > Mordante wrote:
> > > Good old C++03 ;-)
> > Yeah, that's annoying! Is this a request to change this instance and other ones? I'm not sure it's possible because clang-format will try to enforce that (unfortunate) whitespace.
> Fixing it will refrain clang-format from touching it. Feel free to ignore it.
Yeah, this is the `SpacesInAngles: Leave`. It won't remove any whitespace tokens, but also won't add any.
================
Comment at: libcxx/include/__type_traits/is_convertible.h:52
+// clang-format off
template <class _Tp,
----------------
In this case I don't get why you didn't just clang-format it. Also for the similar ones below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153140/new/
https://reviews.llvm.org/D153140
More information about the libcxx-commits
mailing list