[libcxx-commits] [libcxx] 863d5c4 - [libc++] Remove hard tabs, U+00AD, and U+200B from all libc++ headers. NFCI.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 17 14:05:28 PDT 2021


Author: Arthur O'Dwyer
Date: 2021-04-17T17:03:20-04:00
New Revision: 863d5c4e4dcf1ffd3093438a5fa61c3cd1dec704

URL: https://github.com/llvm/llvm-project/commit/863d5c4e4dcf1ffd3093438a5fa61c3cd1dec704
DIFF: https://github.com/llvm/llvm-project/commit/863d5c4e4dcf1ffd3093438a5fa61c3cd1dec704.diff

LOG: [libc++] Remove hard tabs, U+00AD, and U+200B from all libc++ headers. NFCI.

Added: 
    

Modified: 
    libcxx/include/atomic
    libcxx/include/barrier
    libcxx/include/cmath
    libcxx/include/iterator
    libcxx/include/numeric
    libcxx/include/type_traits

Removed: 
    


################################################################################
diff  --git a/libcxx/include/atomic b/libcxx/include/atomic
index f953855074130..3423642d1b60b 100644
--- a/libcxx/include/atomic
+++ b/libcxx/include/atomic
@@ -669,7 +669,7 @@ static_assert((is_same<underlying_type<memory_order>::type, __memory_order_under
   "unexpected underlying type for std::memory_order");
 
 #if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) || \
-	defined(_LIBCPP_ATOMIC_ONLY_USE_BUILTINS)
+    defined(_LIBCPP_ATOMIC_ONLY_USE_BUILTINS)
 
 // [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
 // the default operator= in an object is not volatile, a byte-by-byte copy

diff  --git a/libcxx/include/barrier b/libcxx/include/barrier
index be213a6895ef7..e650773d430ff 100644
--- a/libcxx/include/barrier
+++ b/libcxx/include/barrier
@@ -309,11 +309,11 @@ public:
     {
         __b.wait(_VSTD::move(__phase));
     }
-	_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
     void arrive_and_wait()
     {
         wait(arrive());
-	}
+    }
     _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
     void arrive_and_drop()
     {

diff  --git a/libcxx/include/cmath b/libcxx/include/cmath
index 9c493ce38a538..1efd4e47c22ca 100644
--- a/libcxx/include/cmath
+++ b/libcxx/include/cmath
@@ -622,9 +622,9 @@ _Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
     if (__t == 1) return __b;
     const _Fp __x = __a + __t * (__b - __a);
     if (__t > 1 == __b > __a)
-    	return __b < __x ? __x : __b;
+        return __b < __x ? __x : __b;
     else
-    	return __x < __b ? __x : __b;
+        return __x < __b ? __x : __b;
 }
 
 constexpr float

diff  --git a/libcxx/include/iterator b/libcxx/include/iterator
index 5e9e8229ed1d1..c94d275ae2765 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -406,7 +406,7 @@ template <class C> constexpr auto size(const C& c) -> decltype(c.size());
 template <class T, size_t N> constexpr size_t size(const T (&array)[N]) noexcept; // C++17
 
 template <class C> constexpr auto ssize(const C& c)
-    -> common_type_t<ptr
diff _t, make_signed_t<decltype(c.size())>>;				       // C++20
+    -> common_type_t<ptr
diff _t, make_signed_t<decltype(c.size())>>;                    // C++20
 template <class T, ptr
diff _t> constexpr ptr
diff _t ssize(const T (&array)[N]) noexcept; // C++20
 
 template <class C> constexpr auto empty(const C& c) -> decltype(c.empty());       // C++17

diff  --git a/libcxx/include/numeric b/libcxx/include/numeric
index 4f202bb84f700..862396d5e1e4f 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -613,8 +613,8 @@ _LIBCPP_INLINE_VISIBILITY constexpr
 enable_if_t<is_floating_point_v<_Fp>, _Fp>
 midpoint(_Fp __a, _Fp __b) noexcept
 {
-	constexpr _Fp __lo = numeric_limits<_Fp>::min()*2;
-	constexpr _Fp __hi = numeric_limits<_Fp>::max()/2;
+    constexpr _Fp __lo = numeric_limits<_Fp>::min()*2;
+    constexpr _Fp __hi = numeric_limits<_Fp>::max()/2;
     return __fp_abs(__a) <= __hi && __fp_abs(__b) <= __hi ?  // typical case: overflow is impossible
       (__a + __b)/2 :                                        // always correctly rounded
       __fp_abs(__a) < __lo ? __a + __b/2 :                   // not safe to halve a

diff  --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index 43a04cbf049a6..38cad3312bcf0 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -2424,7 +2424,7 @@ template <class ..._Tp> using common_type_t = typename common_type<_Tp...>::type
 #endif
 
 #if _LIBCPP_STD_VER > 11
-// Let COPYCV(FROM, TO) be an alias for type TO with the addition of FROM’s
+// Let COPYCV(FROM, TO) be an alias for type TO with the addition of FROM's
 // top-level cv-qualifiers.
 template <class _From, class _To>
 struct __copy_cv
@@ -2493,8 +2493,8 @@ struct __xref {
   using __apply = __copy_cvref_t<_Tp, _Up>;
 };
 
-// Given types `A` and `B`, let `X` be `remove_­reference_­t<A>`, let `Y` be `remove_­reference_­t<B>`,
-// and let `COMMON-​REF(A, B)` be:
+// Given types A and B, let X be remove_reference_t<A>, let Y be remove_reference_t<B>,
+// and let COMMON-REF(A, B) be:
 template<class _Ap, class _Bp, class _Xp = remove_reference_t<_Ap>, class _Yp = remove_reference_t<_Bp>>
 struct __common_ref;
 
@@ -2505,8 +2505,8 @@ template<class _Xp, class _Yp>
 using __cv_cond_res = __cond_res<__copy_cv_t<_Xp, _Yp>&, __copy_cv_t<_Yp, _Xp>&>;
 
 
-//    If `A` and `B` are both lvalue reference types, `COMMON-REF(A, B)` is
-//    `COND-RES(COPYCV(X, Y) &, COPYCV(​Y, X) &)` if that type exists and is a reference type.
+//    If A and B are both lvalue reference types, COMMON-REF(A, B) is
+//    COND-RES(COPYCV(X, Y)&, COPYCV(Y, X)&) if that type exists and is a reference type.
 template<class _Ap, class _Bp, class _Xp, class _Yp>
 requires requires { typename __cv_cond_res<_Xp, _Yp>; } && is_reference_v<__cv_cond_res<_Xp, _Yp>>
 struct __common_ref<_Ap&, _Bp&, _Xp, _Yp>
@@ -2514,13 +2514,13 @@ struct __common_ref<_Ap&, _Bp&, _Xp, _Yp>
     using __type = __cv_cond_res<_Xp, _Yp>;
 };
 
-//    Otherwise, let `C` be `remove_­reference_­t<COMMON-REF(X&, Y&)>&&`....
+//    Otherwise, let C be remove_reference_t<COMMON-REF(X&, Y&)>&&. ...
 template <class _Xp, class _Yp>
 using __common_ref_C = remove_reference_t<__common_ref_t<_Xp&, _Yp&>>&&;
 
 
-//    .... If `A` and `B` are both rvalue reference types, `C` is well-formed, and
-//    `is_­convertible_­v<A, C> && is_­convertible_­v<B, C>` is `true`, then `COMMON-REF(A, B)` is `C`.
+//    .... If A and B are both rvalue reference types, C is well-formed, and
+//    is_convertible_v<A, C> && is_convertible_v<B, C> is true, then COMMON-REF(A, B) is C.
 template<class _Ap, class _Bp, class _Xp, class _Yp>
 requires
   requires { typename __common_ref_C<_Xp, _Yp>; } &&
@@ -2531,12 +2531,12 @@ struct __common_ref<_Ap&&, _Bp&&, _Xp, _Yp>
     using __type = __common_ref_C<_Xp, _Yp>;
 };
 
-//    Otherwise, let `D` be `COMMON-REF(const X&, Y&)`....
+//    Otherwise, let D be COMMON-REF(const X&, Y&). ...
 template <class _Tp, class _Up>
 using __common_ref_D = __common_ref_t<const _Tp&, _Up&>;
 
-//    ... If `A` is an rvalue reference and `B` is an lvalue reference and `D` is well-formed and
-//    `is_­convertible_­v<A, D>` is `true`, then `COMMON-REF(A, B)` is `D`.
+//    ... If A is an rvalue reference and B is an lvalue reference and D is well-formed and
+//    is_convertible_v<A, D> is true, then COMMON-REF(A, B) is D.
 template<class _Ap, class _Bp, class _Xp, class _Yp>
 requires requires { typename __common_ref_D<_Xp, _Yp>; } &&
          is_convertible_v<_Ap&&, __common_ref_D<_Xp, _Yp>>
@@ -2545,12 +2545,12 @@ struct __common_ref<_Ap&&, _Bp&, _Xp, _Yp>
     using __type = __common_ref_D<_Xp, _Yp>;
 };
 
-//    Otherwise, if `A` is an lvalue reference and `B` is an rvalue reference, then
-//    `COMMON-REF(A, B)` is `COMMON-REF(B, A)`.
+//    Otherwise, if A is an lvalue reference and B is an rvalue reference, then
+//    COMMON-REF(A, B) is COMMON-REF(B, A).
 template<class _Ap, class _Bp, class _Xp, class _Yp>
 struct __common_ref<_Ap&, _Bp&&, _Xp, _Yp> : __common_ref<_Bp&&, _Ap&> {};
 
-//    Otherwise, `COMMON-REF(A, B)` is ill-formed.
+//    Otherwise, COMMON-REF(A, B) is ill-formed.
 template<class _Ap, class _Bp, class _Xp, class _Yp>
 struct __common_ref {};
 
@@ -2578,8 +2578,8 @@ template <class _Tp, class _Up> struct __common_reference_sub_bullet3;
 template <class _Tp, class _Up> struct __common_reference_sub_bullet2 : __common_reference_sub_bullet3<_Tp, _Up> {};
 template <class _Tp, class _Up> struct __common_reference_sub_bullet1 : __common_reference_sub_bullet2<_Tp, _Up> {};
 
-// sub-bullet 1 - If `T1` and `T2` are reference types and `COMMON-REF(T1, T2)` is well-formed, then
-// the member typedef type denotes that type.
+// sub-bullet 1 - If T1 and T2 are reference types and COMMON-REF(T1, T2) is well-formed, then
+// the member typedef `type` denotes that type.
 template <class _Tp, class _Up> struct common_reference<_Tp, _Up> : __common_reference_sub_bullet1<_Tp, _Up> {};
 
 template <class _Tp, class _Up>
@@ -2589,8 +2589,8 @@ struct __common_reference_sub_bullet1<_Tp, _Up>
     using type = __common_ref_t<_Tp, _Up>;
 };
 
-// sub-bullet 2 - Otherwise, if `basic_­common_­reference<remove_­cvref_­t<T1>, remove_­cvref_­t<T2>, ​XREF(​T1), XREF(T2)>​::​type`
-// is well-formed, then the member typedef type denotes that type.
+// sub-bullet 2 - Otherwise, if basic_common_reference<remove_cvref_t<T1>, remove_cvref_t<T2>, XREF(T1), XREF(T2)>::type
+// is well-formed, then the member typedef `type` denotes that type.
 template <class, class, template <class> class, template <class> class> struct basic_common_reference {};
 
 template <class _Tp, class _Up>
@@ -2605,8 +2605,8 @@ struct __common_reference_sub_bullet2<_Tp, _Up>
     using type = __basic_common_reference_t<_Tp, _Up>;
 };
 
-// sub-bullet 3 - Otherwise, if `COND-RES(T1, T2)` is well-formed, then the member typedef type
-// denotes that type.
+// sub-bullet 3 - Otherwise, if COND-RES(T1, T2) is well-formed,
+// then the member typedef `type` denotes that type.
 template <class _Tp, class _Up>
 requires requires { typename __cond_res<_Tp, _Up>; }
 struct __common_reference_sub_bullet3<_Tp, _Up>
@@ -2615,20 +2615,20 @@ struct __common_reference_sub_bullet3<_Tp, _Up>
 };
 
 
-// sub-bullet 4 & 5 - Otherwise, if `common_­type_­t<T1, T2>` is well-formed, then the member typedef
-//                    type denotes that type.
-//                  - Otherwise, there shall be no member type.
+// sub-bullet 4 & 5 - Otherwise, if common_type_t<T1, T2> is well-formed,
+//                    then the member typedef `type` denotes that type.
+//                  - Otherwise, there shall be no member `type`.
 template <class _Tp, class _Up> struct __common_reference_sub_bullet3 : common_type<_Tp, _Up> {};
 
 // bullet 4 - If there is such a type `C`, the member typedef type shall denote the same type, if
-//            any, as `common_­reference_­t<C, Rest...>`.
+//            any, as `common_reference_t<C, Rest...>`.
 template <class _Tp, class _Up, class _Vp, class... _Rest>
 requires requires { typename common_reference_t<_Tp, _Up>; }
 struct common_reference<_Tp, _Up, _Vp, _Rest...>
     : common_reference<common_reference_t<_Tp, _Up>, _Vp, _Rest...>
 {};
 
-// bullet 5 - Otherwise, there shall be no member type.
+// bullet 5 - Otherwise, there shall be no member `type`.
 template <class...> struct common_reference {};
 
 #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)


        


More information about the libcxx-commits mailing list