[libcxx-commits] [libcxx] 89469df - [libc++] Remove trailing whitespace from libcxx includes, source, tests and benchmarks
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 23 15:26:30 PDT 2022
Author: Louis Dionne
Date: 2022-08-23T18:25:54-04:00
New Revision: 89469df8ba42fd8f0ca2620897d882bf549afeca
URL: https://github.com/llvm/llvm-project/commit/89469df8ba42fd8f0ca2620897d882bf549afeca
DIFF: https://github.com/llvm/llvm-project/commit/89469df8ba42fd8f0ca2620897d882bf549afeca.diff
LOG: [libc++] Remove trailing whitespace from libcxx includes, source, tests and benchmarks
Differential Revision: https://reviews.llvm.org/D132175
Added:
Modified:
libcxx/include/__support/solaris/xlocale.h
libcxx/include/new
libcxx/src/support/ibm/wcsnrtombs.cpp
libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h
libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
libcxx/utils/ci/run-buildbot
Removed:
################################################################################
diff --git a/libcxx/include/__support/solaris/xlocale.h b/libcxx/include/__support/solaris/xlocale.h
index 999102a81167d..373fbfbd6081c 100644
--- a/libcxx/include/__support/solaris/xlocale.h
+++ b/libcxx/include/__support/solaris/xlocale.h
@@ -43,7 +43,7 @@ strtol_l(const char *__nptr, char **__endptr, int __base, locale_t __loc) {
}
inline _LIBCPP_HIDE_FROM_ABI unsigned long long
-strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t __loc)
+strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t __loc)
return ::strtoull(__nptr, __endptr, __base);
}
diff --git a/libcxx/include/new b/libcxx/include/new
index 85f2d9578ec45..90959d54f9764 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -164,7 +164,7 @@ class bad_array_new_length : public bad_alloc {
public:
bad_array_new_length() noexcept : bad_alloc("bad array new length") {}
};
-#endif // defined(_LIBCPP_ABI_VCRUNTIME) && defined(_HAS_EXCEPTIONS) &&_HAS_EXCEPTIONS == 0
+#endif // defined(_LIBCPP_ABI_VCRUNTIME) && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec
diff --git a/libcxx/src/support/ibm/wcsnrtombs.cpp b/libcxx/src/support/ibm/wcsnrtombs.cpp
index f595e63283ae6..66395bfdcb2da 100644
--- a/libcxx/src/support/ibm/wcsnrtombs.cpp
+++ b/libcxx/src/support/ibm/wcsnrtombs.cpp
@@ -14,7 +14,7 @@
// Converts `max_source_chars` from the wide character buffer pointer to by *`src`,
// into the multi byte character sequence buffer stored at `dst`, which must be
// `dst_size_bytes` bytes in size. Returns the number of bytes in the sequence
-// converted from *src, excluding the null terminator.
+// converted from *src, excluding the null terminator.
// Returns (size_t) -1 if an error occurs and sets errno.
// If `dst` is NULL, `dst_size_bytes` is ignored and no bytes are copied to `dst`.
_LIBCPP_FUNC_VIS
diff --git a/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h b/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h
index 6dcd3623e879b..31385bdea05ad 100644
--- a/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h
+++ b/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h
@@ -17,7 +17,7 @@
#include <compare>
#include <iterator>
#include "test_iterators.h"
-#endif
+#endif
struct TrivialSortable {
int value;
@@ -112,7 +112,7 @@ struct NonBorrowedRange {
// TODO: some algorithms calls std::__copy
// std::__copy(contiguous_iterator<int*>, sentinel_wrapper<contiguous_iterator<int*>>, contiguous_iterator<int*>) doesn't seem to work.
- // It seems that it unwraps contiguous_iterator<int*> into int*, and then it failed because there is no == between int* and
+ // It seems that it unwraps contiguous_iterator<int*> into int*, and then it failed because there is no == between int* and
// sentinel_wrapper<contiguous_iterator<int*>>
using Sent = std::conditional_t<std::contiguous_iterator<Iter>, Iter, sentinel_wrapper<Iter>>;
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h b/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
index 6cc7d8cc2dc28..1b4007bce0123 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
@@ -364,7 +364,7 @@ static_assert(!std::is_lvalue_reference_v<std::ranges::range_reference_t<InnerRV
struct move_swap_aware_iter {
- // This is a proxy-like iterator where `reference` is a prvalue, and
+ // This is a proxy-like iterator where `reference` is a prvalue, and
// `reference` and `value_type` are distinct types (similar to `zip_view::iterator`).
using value_type = std::pair<int, int>;
using reference = std::pair<int&, int&>;
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 27431f3c2cac8..8039efb6f6a18 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -187,6 +187,9 @@ check-generated-output)
# Depends on LC_COLLATE set at the top of this script.
! grep -rn '[^ -~]' libcxx/include/ || false
+ # Reject code with trailing whitespace
+ ! grep -rn '[[:blank:]]$' libcxx/include libcxx/src libcxx/test libcxx/benchmarks || false
+
# Reject patches that introduce dependency cycles in the headers.
python3 libcxx/utils/graph_header_deps.py >/dev/null
;;
More information about the libcxx-commits
mailing list