[libcxx-commits] [libcxx] 7c9844b - [libcxx][NFC] Strip trailing whitespace, fix typo.

Stephan T. Lavavej via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 23 11:52:11 PDT 2019


Author: Stephan T. Lavavej
Date: 2019-10-23T11:49:43-07:00
New Revision: 7c9844b66e5e0cca1424e0688b4384d4ec23325a

URL: https://github.com/llvm/llvm-project/commit/7c9844b66e5e0cca1424e0688b4384d4ec23325a
DIFF: https://github.com/llvm/llvm-project/commit/7c9844b66e5e0cca1424e0688b4384d4ec23325a.diff

LOG: [libcxx][NFC] Strip trailing whitespace, fix typo.

Added: 
    

Modified: 
    libcxx/benchmarks/unordered_set_operations.bench.cpp
    libcxx/src/chrono.cpp
    libcxx/src/filesystem/operations.cpp
    libcxx/src/locale.cpp
    libcxx/src/support/solaris/xlocale.cpp
    libcxx/src/support/win32/support.cpp
    libcxx/src/thread.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
    libcxx/test/std/utilities/time/time.hms/time.12/is_am.pass.cpp
    libcxx/test/std/utilities/time/time.hms/time.hms.members/is_negative.pass.cpp
    libcxx/test/std/utilities/time/time.hms/time.hms.members/precision.pass.cpp
    libcxx/test/std/utilities/time/time.hms/time.hms.members/precision_type.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/benchmarks/unordered_set_operations.bench.cpp b/libcxx/benchmarks/unordered_set_operations.bench.cpp
index 3824386e7e2b..e0030d6c473e 100644
--- a/libcxx/benchmarks/unordered_set_operations.bench.cpp
+++ b/libcxx/benchmarks/unordered_set_operations.bench.cpp
@@ -148,7 +148,7 @@ BENCHMARK_CAPTURE(BM_Hash,
 // ---------------------------------------------------------------------------//
 
 
-// Sorted Assending // 
+// Sorted Ascending //
 BENCHMARK_CAPTURE(BM_InsertValue,
     unordered_set_uint32,
     std::unordered_set<uint32_t>{},
@@ -159,7 +159,7 @@ BENCHMARK_CAPTURE(BM_InsertValue,
     std::unordered_set<uint32_t>{},
     getSortedIntegerInputs<uint32_t>)->Arg(TestNumInputs);
 
-// Top Bytes // 
+// Top Bytes //
 BENCHMARK_CAPTURE(BM_InsertValue,
     unordered_set_top_bits_uint32,
     std::unordered_set<uint32_t>{},

diff  --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp
index c461d19ddb1f..2d78caea61c3 100644
--- a/libcxx/src/chrono.cpp
+++ b/libcxx/src/chrono.cpp
@@ -183,7 +183,7 @@ steady_clock::now() _NOEXCEPT
 
 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx says:
 //    If the function fails, the return value is zero. <snip>
-//    On systems that run Windows XP or later, the function will always succeed 
+//    On systems that run Windows XP or later, the function will always succeed
 //      and will thus never return zero.
 
 static LARGE_INTEGER

diff  --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp
index 4e6cb1427a11..08a6b2b86e26 100644
--- a/libcxx/src/filesystem/operations.cpp
+++ b/libcxx/src/filesystem/operations.cpp
@@ -1592,7 +1592,7 @@ static int CompareRootDir(PathParser *LHS, PathParser *RHS) {
 static int CompareRelative(PathParser *LHSPtr, PathParser *RHSPtr) {
   auto &LHS = *LHSPtr;
   auto &RHS = *RHSPtr;
-  
+
   int res;
   while (LHS && RHS) {
     if ((res = (*LHS).compare(*RHS)) != 0)

diff  --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 5b29ee448685..2757eaa5acda 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -39,7 +39,7 @@
 #include "__undef_macros"
 
 // On Linux, wint_t and wchar_t have 
diff erent signed-ness, and this causes
-// lots of noise in the build log, but no bugs that I know of. 
+// lots of noise in the build log, but no bugs that I know of.
 #if defined(__clang__)
 #pragma clang diagnostic ignored "-Wsign-conversion"
 #endif
@@ -770,7 +770,7 @@ const ctype_base::mask ctype_base::xdigit;
 const ctype_base::mask ctype_base::blank;
 const ctype_base::mask ctype_base::alnum;
 const ctype_base::mask ctype_base::graph;
-    
+
 locale::id ctype<wchar_t>::id;
 
 ctype<wchar_t>::~ctype()

diff  --git a/libcxx/src/support/solaris/xlocale.cpp b/libcxx/src/support/solaris/xlocale.cpp
index b6a2bfe21615..d68a39f4dfe5 100644
--- a/libcxx/src/support/solaris/xlocale.cpp
+++ b/libcxx/src/support/solaris/xlocale.cpp
@@ -25,7 +25,7 @@ int iswxdigit_l(wint_t __c, locale_t __l) {
 
 // FIXME: This disregards the locale, which is Very Wrong
 #define vsnprintf_l(__s, __n, __l, __format, __va)  \
-    vsnprintf(__s, __n, __format, __va) 
+    vsnprintf(__s, __n, __format, __va)
 
 int snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...)
 {

diff  --git a/libcxx/src/support/win32/support.cpp b/libcxx/src/support/win32/support.cpp
index 4c9a4b3a507e..d156e02e3e84 100644
--- a/libcxx/src/support/win32/support.cpp
+++ b/libcxx/src/support/win32/support.cpp
@@ -40,13 +40,13 @@ int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap )
     return count;
 }
 
-// Returns >= 0: the number of wide characters found in the 
-// multi byte sequence src (of src_size_bytes), that fit in the buffer dst 
+// Returns >= 0: the number of wide characters found in the
+// multi byte sequence src (of src_size_bytes), that fit in the buffer dst
 // (of max_dest_chars elements size). The count returned excludes the
-// null terminator. When dst is NULL, no characters are copied 
+// null terminator. When dst is NULL, no characters are copied
 // and no "out" parameters are updated.
 // Returns (size_t) -1: an incomplete sequence encountered.
-// Leaves *src pointing the next character to convert or NULL 
+// Leaves *src pointing the next character to convert or NULL
 // if a null character was converted from *src.
 size_t mbsnrtowcs( wchar_t *__restrict dst, const char **__restrict src,
                    size_t src_size_bytes, size_t max_dest_chars, mbstate_t *__restrict ps )
@@ -103,7 +103,7 @@ size_t mbsnrtowcs( wchar_t *__restrict dst, const char **__restrict src,
 // Returns >= 0: the number of bytes in the sequence
 // converted from *src, excluding the null terminator.
 // Returns size_t(-1) if an error occurs, also sets errno.
-// If dst is NULL dst_size_bytes is ignored and no bytes are copied to dst 
+// If dst is NULL dst_size_bytes is ignored and no bytes are copied to dst
 // and no "out" parameters are updated.
 size_t wcsnrtombs( char *__restrict dst, const wchar_t **__restrict src,
                    size_t max_source_chars, size_t dst_size_bytes, mbstate_t *__restrict ps )
@@ -132,7 +132,7 @@ size_t wcsnrtombs( char *__restrict dst, const wchar_t **__restrict src,
             result = wcrtomb_s( &char_size, dst + dest_converted, dest_remaining, c, ps);
         else
             result = wcrtomb_s( &char_size, NULL, 0, c, ps);
-        // If result is zero there is no error and char_size contains the 
+        // If result is zero there is no error and char_size contains the
         // size of the multi-byte-sequence converted.
         // Otherwise result indicates an errno type error.
         if ( result == no_error ) {

diff  --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp
index cee778f6ee85..967a53735acc 100644
--- a/libcxx/src/thread.cpp
+++ b/libcxx/src/thread.cpp
@@ -139,7 +139,7 @@ class _LIBCPP_HIDDEN __hidden_allocator
 {
 public:
     typedef T  value_type;
-    
+
     T* allocate(size_t __n)
         {return static_cast<T*>(::operator new(__n * sizeof(T)));}
     void deallocate(T* __p, size_t) {::operator delete(static_cast<void*>(__p));}

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp
index 9b4251c99bff..2a514f37626b 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp
@@ -48,7 +48,7 @@ void runtime_test()
 {
 	ASSERT_SAME_TYPE(T, decltype(std::floor2(T(0))));
 	ASSERT_NOEXCEPT(             std::floor2(T(0)));
-	
+
 	assert( std::floor2(T(121)) == T(64));
 	assert( std::floor2(T(122)) == T(64));
 	assert( std::floor2(T(123)) == T(64));
@@ -63,7 +63,7 @@ void runtime_test()
 
 int main()
 {
-	
+
     {
     auto lambda = [](auto x) -> decltype(std::floor2(x)) {};
     using L = decltype(lambda);

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp
index 6d60539f249b..d9442ec5fbee 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp
@@ -46,7 +46,7 @@ void runtime_test()
 {
 	ASSERT_SAME_TYPE(bool, decltype(std::ispow2(T(0))));
 	ASSERT_NOEXCEPT(                std::ispow2(T(0)));
-	
+
 	assert(!std::ispow2(T(121)));
 	assert(!std::ispow2(T(122)));
 	assert(!std::ispow2(T(123)));
@@ -61,7 +61,7 @@ void runtime_test()
 
 int main()
 {
-	
+
     {
     auto lambda = [](auto x) -> decltype(std::ispow2(x)) {};
     using L = decltype(lambda);
@@ -158,5 +158,5 @@ int main()
 	assert(!std::ispow2(val+1));
 	}
 #endif
-	
+
 }

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp
index 55df3f1035e0..bf39838a9196 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp
@@ -48,7 +48,7 @@ void runtime_test()
 {
 	ASSERT_SAME_TYPE(T, decltype(std::log2p1(T(0))));
 	ASSERT_NOEXCEPT(             std::log2p1(T(0)));
-	
+
 	assert( std::log2p1(T(0)) == T(0));
 	assert( std::log2p1(T(1)) == T(1));
 	assert( std::log2p1(T(2)) == T(2));
@@ -75,7 +75,7 @@ void runtime_test()
 
 int main()
 {
-	
+
     {
     auto lambda = [](auto x) -> decltype(std::log2p1(x)) {};
     using L = decltype(lambda);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
index f7d837ed3962..7a40a19b9a7c 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
@@ -53,7 +53,7 @@ void runtime_test()
 	ASSERT_SAME_TYPE(int, decltype(std::countl_one(T(0))));
 	ASSERT_NOEXCEPT(               std::countl_one(T(0)));
 	const int dig = std::numeric_limits<T>::digits;
-	
+
 	assert( std::countl_one(T(~121)) == dig - 7);
 	assert( std::countl_one(T(~122)) == dig - 7);
 	assert( std::countl_one(T(~123)) == dig - 7);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
index d984f4de5646..106ab35cc248 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
@@ -53,7 +53,7 @@ void runtime_test()
 	ASSERT_SAME_TYPE(int, decltype(std::countl_zero(T(0))));
 	ASSERT_NOEXCEPT(               std::countl_zero(T(0)));
 	const int dig = std::numeric_limits<T>::digits;
-	
+
 	assert( std::countl_zero(T(121)) == dig - 7);
 	assert( std::countl_zero(T(122)) == dig - 7);
 	assert( std::countl_zero(T(123)) == dig - 7);
@@ -68,7 +68,7 @@ void runtime_test()
 
 int main()
 {
-	
+
     {
     auto lambda = [](auto x) -> decltype(std::countl_zero(x)) {};
     using L = decltype(lambda);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
index 96d1a93af3fe..1bc1db3fa004 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
@@ -52,7 +52,7 @@ void runtime_test()
 {
 	ASSERT_SAME_TYPE(int, decltype(std::countr_one(T(0))));
 	ASSERT_NOEXCEPT(               std::countr_one(T(0)));
-	
+
 	assert( std::countr_one(T(121)) == 1);
 	assert( std::countr_one(T(122)) == 0);
 	assert( std::countr_one(T(123)) == 2);
@@ -67,7 +67,7 @@ void runtime_test()
 
 int main()
 {
-	
+
     {
     auto lambda = [](auto x) -> decltype(std::countr_one(x)) {};
     using L = decltype(lambda);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
index 730b645e76cb..0fe4037ba6af 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
@@ -52,7 +52,7 @@ void runtime_test()
 {
 	ASSERT_SAME_TYPE(int, decltype(std::countr_zero(T(0))));
 	ASSERT_NOEXCEPT(               std::countr_zero(T(0)));
-	
+
 	assert( std::countr_zero(T(121)) == 0);
 	assert( std::countr_zero(T(122)) == 1);
 	assert( std::countr_zero(T(123)) == 0);
@@ -67,7 +67,7 @@ void runtime_test()
 
 int main()
 {
-	
+
     {
     auto lambda = [](auto x) -> decltype(std::countr_zero(x)) {};
     using L = decltype(lambda);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
index adc044cc0733..24fe37aff8bd 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
@@ -50,7 +50,7 @@ void runtime_test()
 {
 	ASSERT_SAME_TYPE(int, decltype(std::popcount(T(0))));
 	ASSERT_NOEXCEPT(               std::popcount(T(0)));
-	
+
 	assert( std::popcount(T(121)) == 5);
 	assert( std::popcount(T(122)) == 5);
 	assert( std::popcount(T(123)) == 6);
@@ -65,7 +65,7 @@ void runtime_test()
 
 int main()
 {
-	
+
     {
     auto lambda = [](auto x) -> decltype(std::popcount(x)) {};
     using L = decltype(lambda);

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
index afde18518cfb..fe7808b87768 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
@@ -25,8 +25,8 @@ int main(int, char**)
 {
 	{
 	std::optional<char &> o1;	        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a reference type is ill-formed"}}
-	std::optional<NonDestructible> o2;  // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed"}}	
-	std::optional<char[20]> o3;	        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with an array type is ill-formed"}}	
+	std::optional<NonDestructible> o2;  // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed"}}
+	std::optional<char[20]> o3;	        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with an array type is ill-formed"}}
 	}
 
 	{

diff  --git a/libcxx/test/std/utilities/time/time.hms/time.12/is_am.pass.cpp b/libcxx/test/std/utilities/time/time.hms/time.12/is_am.pass.cpp
index f10707b2c5ca..f22802012e9b 100644
--- a/libcxx/test/std/utilities/time/time.hms/time.12/is_am.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.hms/time.12/is_am.pass.cpp
@@ -26,7 +26,7 @@ int main(int, char**)
 	static_assert( std::chrono::is_am(hours(11)), "");
 	static_assert(!std::chrono::is_am(hours(12)), "");
 	static_assert(!std::chrono::is_am(hours(23)), "");
-	
+
 	for (int i = 0; i < 12; ++i)
 		assert( std::chrono::is_am(hours(i)));
 	for (int i = 12; i < 24; ++i)

diff  --git a/libcxx/test/std/utilities/time/time.hms/time.hms.members/is_negative.pass.cpp b/libcxx/test/std/utilities/time/time.hms/time.hms.members/is_negative.pass.cpp
index 94eb8be337d6..0220115677e1 100644
--- a/libcxx/test/std/utilities/time/time.hms/time.hms.members/is_negative.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.hms/time.hms.members/is_negative.pass.cpp
@@ -29,10 +29,10 @@ constexpr bool check_neg(Duration d)
 int main(int, char**)
 {
 	using microfortnights = std::chrono::duration<int, std::ratio<756, 625>>;
-	
+
 	static_assert(!check_neg(std::chrono::minutes( 1)), "");
 	static_assert( check_neg(std::chrono::minutes(-1)), "");
-	
+
 	assert(!check_neg(std::chrono::seconds( 5000)));
 	assert( check_neg(std::chrono::seconds(-5000)));
 	assert(!check_neg(std::chrono::minutes( 5000)));

diff  --git a/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision.pass.cpp b/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision.pass.cpp
index e3dc30e75c60..ba20882ecf0e 100644
--- a/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision.pass.cpp
@@ -45,7 +45,7 @@ constexpr unsigned long long powers[] = {
 	1000000000000000000ULL,
 	10000000000000000000ULL
 	};
-	
+
 template <typename Duration, unsigned width>
 constexpr bool check_precision()
 {

diff  --git a/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision_type.pass.cpp b/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision_type.pass.cpp
index e3dc30e75c60..ba20882ecf0e 100644
--- a/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision_type.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.hms/time.hms.members/precision_type.pass.cpp
@@ -45,7 +45,7 @@ constexpr unsigned long long powers[] = {
 	1000000000000000000ULL,
 	10000000000000000000ULL
 	};
-	
+
 template <typename Duration, unsigned width>
 constexpr bool check_precision()
 {


        


More information about the libcxx-commits mailing list