Skip to content

Commit

Permalink
[libcxx][NFC] Strip trailing whitespace, fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej committed Oct 23, 2019
1 parent bf2975e commit 7c9844b
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions libcxx/benchmarks/unordered_set_operations.bench.cpp
Expand Up @@ -148,7 +148,7 @@ BENCHMARK_CAPTURE(BM_Hash,
// ---------------------------------------------------------------------------//


// Sorted Assending //
// Sorted Ascending //
BENCHMARK_CAPTURE(BM_InsertValue,
unordered_set_uint32,
std::unordered_set<uint32_t>{},
Expand All @@ -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>{},
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/chrono.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/operations.cpp
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions libcxx/src/locale.cpp
Expand Up @@ -39,7 +39,7 @@
#include "__undef_macros"

// On Linux, wint_t and wchar_t have different 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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/support/solaris/xlocale.cpp
Expand Up @@ -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, ...)
{
Expand Down
12 changes: 6 additions & 6 deletions libcxx/src/support/win32/support.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/thread.cpp
Expand Up @@ -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));}
Expand Down
4 changes: 2 additions & 2 deletions libcxx/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp
Expand Up @@ -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));
Expand All @@ -63,7 +63,7 @@ void runtime_test()

int main()
{

{
auto lambda = [](auto x) -> decltype(std::floor2(x)) {};
using L = decltype(lambda);
Expand Down
6 changes: 3 additions & 3 deletions libcxx/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp
Expand Up @@ -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)));
Expand All @@ -61,7 +61,7 @@ void runtime_test()

int main()
{

{
auto lambda = [](auto x) -> decltype(std::ispow2(x)) {};
using L = decltype(lambda);
Expand Down Expand Up @@ -158,5 +158,5 @@ int main()
assert(!std::ispow2(val+1));
}
#endif

}
4 changes: 2 additions & 2 deletions libcxx/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp
Expand Up @@ -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));
Expand All @@ -75,7 +75,7 @@ void runtime_test()

int main()
{

{
auto lambda = [](auto x) -> decltype(std::log2p1(x)) {};
using L = decltype(lambda);
Expand Down
Expand Up @@ -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);
Expand Down
Expand Up @@ -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);
Expand All @@ -68,7 +68,7 @@ void runtime_test()

int main()
{

{
auto lambda = [](auto x) -> decltype(std::countl_zero(x)) {};
using L = decltype(lambda);
Expand Down
4 changes: 2 additions & 2 deletions libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
Expand Up @@ -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);
Expand All @@ -67,7 +67,7 @@ void runtime_test()

int main()
{

{
auto lambda = [](auto x) -> decltype(std::countr_one(x)) {};
using L = decltype(lambda);
Expand Down
Expand Up @@ -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);
Expand All @@ -67,7 +67,7 @@ void runtime_test()

int main()
{

{
auto lambda = [](auto x) -> decltype(std::countr_zero(x)) {};
using L = decltype(lambda);
Expand Down
4 changes: 2 additions & 2 deletions libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
Expand Up @@ -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);
Expand All @@ -65,7 +65,7 @@ void runtime_test()

int main()
{

{
auto lambda = [](auto x) -> decltype(std::popcount(x)) {};
using L = decltype(lambda);
Expand Down
Expand Up @@ -25,8 +25,8 @@ int main(int, char**)
{
{
std::optional<char &> o1; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with a reference type is ill-formed"}}
std::optional<NonDestructible> o2; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed"}}
std::optional<char[20]> o3; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with an array type is ill-formed"}}
std::optional<NonDestructible> o2; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed"}}
std::optional<char[20]> o3; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with an array type is ill-formed"}}
}

{
Expand Down
Expand Up @@ -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)
Expand Down
Expand Up @@ -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)));
Expand Down
Expand Up @@ -45,7 +45,7 @@ constexpr unsigned long long powers[] = {
1000000000000000000ULL,
10000000000000000000ULL
};

template <typename Duration, unsigned width>
constexpr bool check_precision()
{
Expand Down
Expand Up @@ -45,7 +45,7 @@ constexpr unsigned long long powers[] = {
1000000000000000000ULL,
10000000000000000000ULL
};

template <typename Duration, unsigned width>
constexpr bool check_precision()
{
Expand Down

0 comments on commit 7c9844b

Please sign in to comment.