[NFC][libc++] Consistently use spaces to indent
rdar://problem/19988944
llvm-svn: 338933
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 7c3492b00d99c81d4a58a8015dbe313eabaea799
diff --git a/include/__tree b/include/__tree
index af9b961..3b3586c 100644
--- a/include/__tree
+++ b/include/__tree
@@ -857,7 +857,7 @@
__tree_iterator operator--(int)
{__tree_iterator __t(*this); --(*this); return __t;}
- friend _LIBCPP_INLINE_VISIBILITY
+ friend _LIBCPP_INLINE_VISIBILITY
bool operator==(const __tree_iterator& __x, const __tree_iterator& __y)
{return __x.__ptr_ == __y.__ptr_;}
friend _LIBCPP_INLINE_VISIBILITY
@@ -1488,7 +1488,7 @@
void __copy_assign_alloc(const __tree& __t, true_type)
{
if (__node_alloc() != __t.__node_alloc())
- clear();
+ clear();
__node_alloc() = __t.__node_alloc();
}
_LIBCPP_INLINE_VISIBILITY
@@ -1830,7 +1830,7 @@
__node_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<value_compare>::value &&
is_nothrow_move_assignable<__node_allocator>::value)
-
+
{
__move_assign(__t, integral_constant<bool,
__node_traits::propagate_on_container_move_assignment::value>());
diff --git a/include/any b/include/any
index 9bd2f53..e6e0b6e 100644
--- a/include/any
+++ b/include/any
@@ -110,7 +110,7 @@
#ifndef _LIBCPP_NO_EXCEPTIONS
throw bad_any_cast();
#else
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
diff --git a/include/bitset b/include/bitset
index cd6c289..6e28596 100644
--- a/include/bitset
+++ b/include/bitset
@@ -238,9 +238,9 @@
size_t __sz = _Size;
for (size_t __i = 0; __i < sizeof(__t)/sizeof(__t[0]); ++__i, __v >>= __bits_per_word, __sz -= __bits_per_word )
if ( __sz < __bits_per_word)
- __t[__i] = static_cast<__storage_type>(__v) & ( 1ULL << __sz ) - 1;
+ __t[__i] = static_cast<__storage_type>(__v) & ( 1ULL << __sz ) - 1;
else
- __t[__i] = static_cast<__storage_type>(__v);
+ __t[__i] = static_cast<__storage_type>(__v);
_VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_);
_VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]),
@@ -254,7 +254,7 @@
{
__first_[0] = __v;
if (_Size < __bits_per_word)
- __first_[0] &= ( 1ULL << _Size ) - 1;
+ __first_[0] &= ( 1ULL << _Size ) - 1;
_VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0));
}
@@ -269,9 +269,9 @@
#if __SIZEOF_SIZE_T__ == 8
: __first_{__v}
#elif __SIZEOF_SIZE_T__ == 4
- : __first_{static_cast<__storage_type>(__v),
- _Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
- : static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}
+ : __first_{static_cast<__storage_type>(__v),
+ _Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
+ : static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}
#else
#error This constructor has not been ported to this platform
#endif
diff --git a/include/chrono b/include/chrono
index f6a6f4b..f0bd6af 100644
--- a/include/chrono
+++ b/include/chrono
@@ -323,7 +323,7 @@
template<class DestClock, class SourceClock, class Duration>
auto clock_cast(const time_point<SourceClock, Duration>& t);
-
+
// 25.8.2, class last_spec // C++20
struct last_spec;
@@ -528,7 +528,7 @@
operator-(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
constexpr year_month_weekday_last
operator-(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
-
+
// 25.8.18, civil calendar conventional syntax operators // C++20
constexpr year_month
operator/(const year& y, const month& m) noexcept;
@@ -609,7 +609,7 @@
constexpr year_month_weekday_last
operator/(const month_weekday_last& mwdl, const year& y) noexcept;
constexpr year_month_weekday_last
- operator/(const month_weekday_last& mwdl, int y) noexcept;
+ operator/(const month_weekday_last& mwdl, int y) noexcept;
// 25.9, class template time_of_day // C++20
template<class Duration> class time_of_day;
@@ -640,7 +640,7 @@
// 25.10.4, information classes // C++20
struct sys_info;
struct local_info;
-
+
// 25.10.5, class time_zone // C++20
enum class choose {earliest, latest};
class time_zone;
@@ -650,7 +650,7 @@
bool operator>(const time_zone& x, const time_zone& y) noexcept;
bool operator<=(const time_zone& x, const time_zone& y) noexcept;
bool operator>=(const time_zone& x, const time_zone& y) noexcept;
-
+
// 25.10.6, class template zoned_traits // C++20
template<class T> struct zoned_traits;
@@ -724,7 +724,7 @@
template<class charT, class traits, class Alloc, class Streamable>
basic_string<charT, traits, Alloc>
format(const locale& loc, const basic_string<charT, traits, Alloc>& fmt,
- const Streamable& s);
+ const Streamable& s);
// 25.12, parsing // C++20
template<class charT, class traits, class Alloc, class Parsable>
@@ -746,7 +746,7 @@
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
-inline constexpr last_spec last{}; // C++20
+inline constexpr last_spec last{}; // C++20
inline constexpr chrono::weekday Sunday{0}; // C++20
inline constexpr chrono::weekday Monday{1}; // C++20
inline constexpr chrono::weekday Tuesday{2}; // C++20
@@ -1015,7 +1015,7 @@
typedef ratio<__mul<__n1, __d2, !value>::value,
__mul<__n2, __d1, !value>::value> type;
};
-
+
public:
typedef _Rep rep;
typedef typename _Period::type period;
@@ -1576,7 +1576,7 @@
#if _LIBCPP_STD_VER > 11
// Suffixes for duration literals [time.duration.literals]
inline namespace literals
-{
+{
inline namespace chrono_literals
{
@@ -1633,7 +1633,7 @@
{
return chrono::duration<long double, micro> (__us);
}
-
+
constexpr chrono::nanoseconds operator""ns(unsigned long long __ns)
{
diff --git a/include/cstddef b/include/cstddef
index adeefda..1dc5d39 100644
--- a/include/cstddef
+++ b/include/cstddef
@@ -66,10 +66,10 @@
constexpr byte operator| (byte __lhs, byte __rhs) noexcept
{
- return static_cast<byte>(
- static_cast<unsigned char>(
- static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
- ));
+ return static_cast<byte>(
+ static_cast<unsigned char>(
+ static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
+ ));
}
constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
@@ -77,10 +77,10 @@
constexpr byte operator& (byte __lhs, byte __rhs) noexcept
{
- return static_cast<byte>(
- static_cast<unsigned char>(
- static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
- ));
+ return static_cast<byte>(
+ static_cast<unsigned char>(
+ static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
+ ));
}
constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
@@ -88,13 +88,13 @@
constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
{
- return static_cast<byte>(
- static_cast<unsigned char>(
- static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
- ));
+ return static_cast<byte>(
+ static_cast<unsigned char>(
+ static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
+ ));
}
-constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
+constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs ^ __rhs; }
constexpr byte operator~ (byte __b) noexcept
diff --git a/include/functional b/include/functional
index 6b70f73..b91fd75 100644
--- a/include/functional
+++ b/include/functional
@@ -1006,7 +1006,7 @@
{
_Predicate __pred_;
public:
- _LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_AFTER_CXX11
binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -1405,7 +1405,7 @@
#ifndef _LIBCPP_NO_EXCEPTIONS
throw bad_function_call();
#else
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
@@ -1790,7 +1790,7 @@
typedef __function::__func<_Fp, _Alloc, _Rp(_ArgTypes...)> _FF;
typedef typename __rebind_alloc_helper<__alloc_traits, _FF>::type _Ap;
_Ap __a(__a0);
- if (sizeof(_FF) <= sizeof(__buf_) &&
+ if (sizeof(_FF) <= sizeof(__buf_) &&
is_nothrow_copy_constructible<_Fp>::value && is_nothrow_copy_constructible<_Ap>::value)
{
__f_ = ::new((void*)&__buf_) _FF(_VSTD::move(__f), _Alloc(__a));
@@ -2497,7 +2497,7 @@
class _LIBCPP_TYPE_VIS default_searcher {
public:
_LIBCPP_INLINE_VISIBILITY
- default_searcher(_ForwardIterator __f, _ForwardIterator __l,
+ default_searcher(_ForwardIterator __f, _ForwardIterator __l,
_BinaryPredicate __p = _BinaryPredicate())
: __first_(__f), __last_(__l), __pred_(__p) {}
diff --git a/include/new b/include/new
index e70b9c6..d33f691 100644
--- a/include/new
+++ b/include/new
@@ -290,13 +290,13 @@
#ifndef _LIBCPP_NO_EXCEPTIONS
throw bad_array_length();
#else
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
#endif
template <class _Tp>
-_LIBCPP_NODISCARD_AFTER_CXX17 inline
+_LIBCPP_NODISCARD_AFTER_CXX17 inline
_LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT
{
static_assert (!(is_function<_Tp>::value), "can't launder functions" );
diff --git a/include/numeric b/include/numeric
index b33b6a3..70ef173 100644
--- a/include/numeric
+++ b/include/numeric
@@ -104,15 +104,15 @@
template<class InputIterator, class OutputIterator,
class BinaryOperation, class UnaryOperation>
- OutputIterator
- transform_inclusive_scan(InputIterator first, InputIterator last,
+ OutputIterator
+ transform_inclusive_scan(InputIterator first, InputIterator last,
OutputIterator result,
BinaryOperation binary_op, UnaryOperation unary_op); // C++17
template<class InputIterator, class OutputIterator,
class BinaryOperation, class UnaryOperation, class T>
- OutputIterator
- transform_inclusive_scan(InputIterator first, InputIterator last,
+ OutputIterator
+ transform_inclusive_scan(InputIterator first, InputIterator last,
OutputIterator result,
BinaryOperation binary_op, UnaryOperation unary_op,
T init); // C++17
diff --git a/include/span b/include/span
index db8f836..5a77ff8 100644
--- a/include/span
+++ b/include/span
@@ -39,11 +39,11 @@
// [span.objectrep], views of object representation
template <class ElementType, ptrdiff_t Extent>
- span<const byte, ((Extent == dynamic_extent) ? dynamic_extent :
+ span<const byte, ((Extent == dynamic_extent) ? dynamic_extent :
(static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent))> as_bytes(span<ElementType, Extent> s) noexcept;
template <class ElementType, ptrdiff_t Extent>
- span< byte, ((Extent == dynamic_extent) ? dynamic_extent :
+ span< byte, ((Extent == dynamic_extent) ? dynamic_extent :
(static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent))> as_writable_bytes(span<ElementType, Extent> s) noexcept;
@@ -123,7 +123,7 @@
template<class T, size_t N>
span(T (&)[N]) -> span<T, N>;
-
+
template<class T, size_t N>
span(array<T, N>&) -> span<T, N>;
@@ -194,8 +194,8 @@
decltype(size(declval<_Tp>())),
// remove_pointer_t<decltype(data(cont))>(*)[] is convertible to ElementType(*)[]
typename enable_if<
- is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
- _ElementType(*)[]>,
+ is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
+ _ElementType(*)[]>,
nullptr_t>::type
>>
: public true_type {};
@@ -221,7 +221,7 @@
static constexpr index_type extent = _Extent;
static_assert (_Extent >= 0, "Can't have a span with an extent < 0");
-// [span.cons], span constructors, copy, assignment, and destructor
+// [span.cons], span constructors, copy, assignment, and destructor
_LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr}
{ static_assert(_Extent == 0, "Can't default construct a statically sized span with size > 0"); }
@@ -287,7 +287,7 @@
static_assert(_Count <= _Extent, "Count out of range in span::last()");
return {data() + size() - _Count, _Count};
}
-
+
_LIBCPP_INLINE_VISIBILITY
constexpr span<element_type, dynamic_extent> first(index_type __count) const noexcept
{
@@ -315,7 +315,7 @@
inline _LIBCPP_INLINE_VISIBILITY
constexpr span<element_type, dynamic_extent>
subspan(index_type __offset, index_type __count = dynamic_extent) const noexcept
- {
+ {
_LIBCPP_ASSERT( __offset >= 0 && __offset <= size(), "Offset out of range in span::subspan(offset, count)");
_LIBCPP_ASSERT((__count >= 0 && __count <= size()) || __count == dynamic_extent, "Count out of range in span::subspan(offset, count)");
if (__count == dynamic_extent)
@@ -331,14 +331,14 @@
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
{
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>[] index out of bounds");
- return __data[__idx];
- }
+ return __data[__idx];
+ }
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
{
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>() index out of bounds");
- return __data[__idx];
- }
+ return __data[__idx];
+ }
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
@@ -358,7 +358,7 @@
__data = __other.__data;
__other.__data = __p;
}
-
+
_LIBCPP_INLINE_VISIBILITY span<const byte, _Extent * sizeof(element_type)> __as_bytes() const noexcept
{ return {reinterpret_cast<const byte *>(data()), size_bytes()}; }
@@ -392,7 +392,7 @@
static constexpr index_type extent = dynamic_extent;
-// [span.cons], span constructors, copy, assignment, and destructor
+// [span.cons], span constructors, copy, assignment, and destructor
_LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr}, __size{0} {}
constexpr span (const span&) noexcept = default;
@@ -408,7 +408,7 @@
template <size_t _Sz>
inline _LIBCPP_INLINE_VISIBILITY
constexpr span(array<value_type, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
-
+
template <size_t _Sz>
inline _LIBCPP_INLINE_VISIBILITY
constexpr span(const array<value_type, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
@@ -460,7 +460,7 @@
_LIBCPP_ASSERT(__count >= 0 && __count <= size(), "Count out of range in span::first(count)");
return {data(), __count};
}
-
+
_LIBCPP_INLINE_VISIBILITY
constexpr span<element_type, dynamic_extent> last (index_type __count) const noexcept
{
@@ -480,7 +480,7 @@
constexpr span<element_type, dynamic_extent>
inline _LIBCPP_INLINE_VISIBILITY
subspan(index_type __offset, index_type __count = dynamic_extent) const noexcept
- {
+ {
_LIBCPP_ASSERT( __offset >= 0 && __offset <= size(), "Offset out of range in span::subspan(offset, count)");
_LIBCPP_ASSERT((__count >= 0 && __count <= size()) || __count == dynamic_extent, "count out of range in span::subspan(offset, count)");
if (__count == dynamic_extent)
@@ -496,14 +496,14 @@
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
{
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>[] index out of bounds");
- return __data[__idx];
- }
+ return __data[__idx];
+ }
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
{
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>() index out of bounds");
- return __data[__idx];
- }
+ return __data[__idx];
+ }
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
@@ -553,7 +553,7 @@
constexpr bool
operator< (const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
{ return lexicographical_compare (__lhs.begin(), __lhs.end(), __rhs.begin(), __rhs.end()); }
-
+
template <class _Tp1, ptrdiff_t _Extent1, class _Tp2, ptrdiff_t _Extent2>
constexpr bool
operator<=(const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
@@ -563,7 +563,7 @@
constexpr bool
operator> (const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
{ return __rhs < __lhs; }
-
+
template <class _Tp1, ptrdiff_t _Extent1, class _Tp2, ptrdiff_t _Extent2>
constexpr bool
operator>=(const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
@@ -571,7 +571,7 @@
// as_bytes & as_writeable_bytes
template <class _Tp, ptrdiff_t _Extent>
- auto as_bytes(span<_Tp, _Extent> __s) noexcept
+ auto as_bytes(span<_Tp, _Extent> __s) noexcept
-> decltype(__s.__as_bytes())
{ return __s.__as_bytes(); }
@@ -588,7 +588,7 @@
// Deduction guides
template<class _Tp, size_t _Sz>
span(_Tp (&)[_Sz]) -> span<_Tp, _Sz>;
-
+
template<class _Tp, size_t _Sz>
span(array<_Tp, _Sz>&) -> span<_Tp, _Sz>;
diff --git a/include/sstream b/include/sstream
index b01f47b..9c3ee13 100644
--- a/include/sstream
+++ b/include/sstream
@@ -473,12 +473,12 @@
{
while (__sz > INT_MAX)
{
- this->pbump(INT_MAX);
- __sz -= INT_MAX;
+ this->pbump(INT_MAX);
+ __sz -= INT_MAX;
}
if (__sz > 0)
- this->pbump(__sz);
- }
+ this->pbump(__sz);
+ }
}
}
diff --git a/include/stdexcept b/include/stdexcept
index 6533497..3ec7934 100644
--- a/include/stdexcept
+++ b/include/stdexcept
@@ -192,7 +192,7 @@
throw logic_error(__msg);
#else
((void)__msg);
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
@@ -203,7 +203,7 @@
throw domain_error(__msg);
#else
((void)__msg);
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
@@ -214,7 +214,7 @@
throw invalid_argument(__msg);
#else
((void)__msg);
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
@@ -225,7 +225,7 @@
throw length_error(__msg);
#else
((void)__msg);
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
@@ -236,7 +236,7 @@
throw out_of_range(__msg);
#else
((void)__msg);
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
@@ -247,7 +247,7 @@
throw range_error(__msg);
#else
((void)__msg);
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
diff --git a/include/typeinfo b/include/typeinfo
index f32ea6e..92f1e22 100644
--- a/include/typeinfo
+++ b/include/typeinfo
@@ -232,7 +232,7 @@
#ifndef _LIBCPP_NO_EXCEPTIONS
throw bad_cast();
#else
- _VSTD::abort();
+ _VSTD::abort();
#endif
}
_LIBCPP_END_NAMESPACE_STD