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

This commit is contained in:
Stephan T. Lavavej 2019-10-23 11:45:36 -07:00
parent bf2975eca0
commit 7c9844b66e
20 changed files with 37 additions and 37 deletions

View File

@ -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>{},

View File

@ -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

View File

@ -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)

View File

@ -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
@ -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()

View File

@ -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, ...)
{

View File

@ -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 ) {

View File

@ -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));}

View File

@ -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);

View File

@ -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
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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"}}
}
{

View File

@ -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)

View File

@ -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)));

View File

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

View File

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