| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
Some tests require `TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT`, but they
did not include the header that defines that macro.
Thanks to Michael Park for the patch.
Differential Revision: https://reviews.llvm.org/D62920
llvm-svn: 362660
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds tests that repeated characters in regular expressions
are within numeric limits, and that a <= b in a regex like `x{a,b}`.
Thanks to Andrey Maksimov for the patch.
Differential Revision: https://reviews.llvm.org/D62816
llvm-svn: 362525
|
|
|
|
|
|
| |
_and_ the input has no grouping characters at all. We continue to reject cases when the input has grouping characters in the wrong place. Fixes PR#28704
llvm-svn: 362508
|
|
|
|
|
|
| |
Thanks to Zoe for the (big, but simple) patch. NFC intended.
llvm-svn: 362252
|
|
|
|
| |
llvm-svn: 362115
|
|
|
|
| |
llvm-svn: 361970
|
|
|
|
| |
llvm-svn: 361894
|
|
|
|
|
|
| |
behavior. Reviewed as https://reviews.llvm.org/D61828. Thanks to Mark for the catch and the fix.
llvm-svn: 361887
|
|
|
|
| |
llvm-svn: 361594
|
|
|
|
| |
llvm-svn: 361593
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This provides the `std::destroying_delete_t` declaration in C++2a and after. (Even when the compiler doesn't support the language feature).
However, the feature test macro `__cpp_lib_destroying_delete` is only defined when we have both language support and C++2a.
Reviewers: ldionne, ckennelly, serge-sans-paille, EricWF
Reviewed By: EricWF
Subscribers: dexonsmith, riccibruno, christof, jwakely, jdoerfert, mclow.lists, ldionne, libcxx-commits
Differential Revision: https://reviews.llvm.org/D55840
llvm-svn: 361572
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests assume that iteration through an unordered multiset elements
will return them in the same order as at the container creation. This
assumption is not true since the container is unordered, so that no
specific order of elements is ever guaranteed for such container. This
patch introduces checks verifying that any iteration will return
elements exactly from a set of valid values and without repetition,
but in no particular order.
Thanks to Andrey Maksimov for the patch.
Differential Revision: https://reviews.llvm.org/D56500
llvm-svn: 361494
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests assume that iteration through an unordered multimap elements
will return them in the same order as at the container creation. This
assumption is not true since the container is unordered, so that no
specific order of elements is ever guaranteed for such container. This
patch is a continuation of D54838 and introduces checks verifying that
any iteration will return elements exactly from a set of valid values
and without repetition, but in no particular order.
Thanks to Andrey Maksimov for the patch.
Differential Revision: https://reviews.llvm.org/D56498
llvm-svn: 361414
|
|
|
|
|
|
| |
https://reviews.llvm.org/D61954
llvm-svn: 361201
|
|
|
|
|
|
|
|
| |
The `using namespace std;` opens us up to ambiguity
when any of the std:: names are also present in the global namespace.
Instead we should properly qualify names we use from std::.
llvm-svn: 361074
|
|
|
|
| |
llvm-svn: 360911
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use std::nextafter() instead of std::nexttoward() in midpoint tests.
In the context of this test, this should not cause any difference.
Since nexttowardl() is not implemented on NetBSD 8, the latter function
combined with 'long double' type caused test failure. nextafterl() does
not have this problem.
Differential Revision: https://reviews.llvm.org/D61748
llvm-svn: 360673
|
|
|
|
|
|
| |
Patch by Ben Craig.
llvm-svn: 360590
|
|
|
|
|
|
| |
https://reviews.llvm.org/D61829 Thanks to Zoe for the patch.
llvm-svn: 360586
|
|
|
|
| |
llvm-svn: 360306
|
|
|
|
|
|
| |
See discussion on https://reviews.llvm.org/D48292
llvm-svn: 359907
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocates with ::new
Drive-by:
* Fix potential race between check and update of `throw_one` in `operator new`
* Fix latent bug in `operator delete`, which shouldn't decrement `outstanding_new` when passed a null pointer
* Specifically catch the expected `bad_alloc` in `main` instead of `...`
Differential Revision: https://reviews.llvm.org/D50860
llvm-svn: 359827
|
|
|
|
|
|
|
|
| |
Linux is failing even though the test runner does report this locale
is available, but the test still isn't expected to work on platforms
without the locale (like Android).
llvm-svn: 359726
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds explicit support for the WASI platform to libcxx.
WASI libc uses some components from musl, however it's not fully compatible
with musl, so we're planning to stop using _LIBCPP_HAS_MUSL_LIBC and
customize for WASI libc specifically.
Differential Revision: https://reviews.llvm.org/D61336
Reviewers: sbc100, ldionne
llvm-svn: 359703
|
|
|
|
|
|
| |
debug_level set. NFC
llvm-svn: 359672
|
|
|
|
|
|
| |
_LIBCPP_DEBUG was set.
llvm-svn: 359642
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The current implementation of aligned storage was written before we had `alignas`, so it used a list of builtin types to force the alignment. But this doesn't work overaligned requests.
This patch adds a fallback case supporting over-alignment. It only affects case that were previously ill-formed.
Reviewers: rsmith, ldionne, dlj, mclow.lists
Reviewed By: mclow.lists
Subscribers: mclow.lists, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D61301
llvm-svn: 359596
|
|
|
|
| |
llvm-svn: 359526
|
|
|
|
|
|
| |
tests. NFC
llvm-svn: 359458
|
|
|
|
|
|
| |
precondtion. Fix several tests which did not honor this precondition. Thanks to Andrey Maksimov for pointing this out.
llvm-svn: 359324
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The standard requires the following for the std::regex_constants::error_type
values: "The type error_type is an implementation-defined enumerated type."
The values of this enumerated type are not required to be non-zero.
This patch makes such checks in tests libc++-specific to let the tests
pass for other conforming implementations.
Thanks to Andrey Maksimov for the patch.
Differential Revision: https://reviews.llvm.org/D61195
llvm-svn: 359320
|
|
|
|
| |
llvm-svn: 359256
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the arguments to tuple cat were const, the const was incorrectly
propagated into the type of the resulting tuple. For example:
const std::tuple<int> t(42);
auto r = std::tuple_cat(t, t);
// Incorrect! should be std::tuple<int, int>.
static_assert(is_same_v<decltype(r), std::tuple<const int, const int>>);
llvm-svn: 359255
|
|
|
|
|
|
|
|
|
|
| |
All constant expressions are non-potentially-throwing in C++14, but that is *not* the case in C++17. Change these tests of the `variant`-flavored overloads of `std::get` to expect the correct behavior when the compiler is not GCC or is GCC 9+.
Credit to Jonathan Wakely for providing an improved version of my initial change that validates the incorrect behavior on GCC < 9 as well as validating the correct behavior on other compilers.
Differential Revision: https://reviews.llvm.org/D61033
llvm-svn: 359220
|
|
|
|
| |
llvm-svn: 359211
|
|
|
|
|
|
| |
https://reviews.llvm.org/D61014.
llvm-svn: 359184
|
|
|
|
|
|
| |
constructor. Fixes PR#41577.
llvm-svn: 359162
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach libcxx to stop using various deprecated __has_* type traits, in favor of
the ("modern", C++11 era) __is_* type traits.
This is mostly just a simplification, but fixes at least one bug: _Atomic T
should be considered trivially-destructible, but is not considered to be POD by
Clang, and __has_trivial_destructor is specified in the GCC documentation as
returning false for non-POD non-class types.
Differential Revision: https://reviews.llvm.org/D48292
llvm-svn: 359159
|
|
|
|
|
|
|
|
|
| |
Clang recently added __builtin_is_constant_evaluated() and GCC 9.0
has it as well.
This patch adds support for it in libc++.
llvm-svn: 359119
|
|
|
|
|
|
| |
currently does not). Thanks to Jonathan Wakely for the fix.
llvm-svn: 359108
|
|
|
|
| |
llvm-svn: 359106
|
|
|
|
|
|
| |
<0/0/>0. Thanks to Jonathan Wakely for the report.
llvm-svn: 359104
|
|
|
|
|
|
| |
suggestion.
llvm-svn: 359085
|
|
|
|
| |
llvm-svn: 359080
|
|
|
|
| |
llvm-svn: 359023
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
All overloads of `::abs` and `std::abs` must be present in both `<cmath>` and `<cstdlib>`. This is problematic to implement because C defines `fabs` in `math.h` and `labs` in `stdlib.h`. This introduces a circular dependency between the two headers.
This patch implements that requirement by moving `abs` into `math.h` and making `stdlib.h` include `math.h`. In order to get the underlying C declarations from the "real" `stdlib.h` inside our `math.h` we need some trickery. Specifically we need to make `stdlib.h` include next itself.
Suggestions for a cleaner implementation are welcome.
Reviewers: mclow.lists, ldionne
Reviewed By: ldionne
Subscribers: krytarowski, fedor.sergeev, dexonsmith, jdoerfert, jsji, libcxx-commits
Differential Revision: https://reviews.llvm.org/D60097
llvm-svn: 359020
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to MSVC's decision to encode `wchar_t` as UTF-16, it rejects wide
character/string literals that expect a character value greater than
`\xffff`. UTF-16 `wchar_t` is clearly non-conforming, given that the
standard requires wchar_t to be capable of representing all characters
in the supported wide character execution sets, but rejecting e.g.
`\x40003` is a reasonably sane compromise given that encoding choice:
there's an expectation that `\xFOO` produces a single character in the
resulting literal. Consequently `L'\x40003'`/`L"\x40003"` are ill-formed
literals on MSVC. `L'\U00040003'` is a high surrogate (and produces a
warning about ignoring the "second character" in a multi-character
literal), and `L"\U00040003"` is a perfectly-valid `const wchar_t[3]`.
This change updates these tests to use universal-character-names instead
of raw values for the intended character values, which technically makes
them portable even to implementations that don't use a unicode
transformation format encoding for their wide character execution
character set. The two-character literal `L"\u1005e"` is awkward - the
`e` looks like part of the UCN's hex encoding - but necessary to compile
in '03 mode since '03 didn't allow UCNs to be used for members of the
basic execution character set even in character/string literals.
I've also eliminated the extraneous `\x00` "bonus null-terminator" in
some of the string literals which doesn't affect the tested behavior.
I'm sorry about using `*L"\U00040003"` in `conversions.string/to_bytes.pass.cpp`,
but it's correct for platforms with 32-bit wchar_t, *and* doesn't
trigger narrowing warnings as did the prior `CharT(0x40003)`.
Differential Revision: https://reviews.llvm.org/D60950
llvm-svn: 358908
|
|
|
|
|
|
| |
... when including msvc_stdlib_force_include.hpp.
llvm-svn: 358782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a followup to [1] which added a new `__debug_less::operator()` overload.
[2] added `_LIBCPP_CONSTEXPR_AFTER_CXX17` to the original
`__debug_less::operator()` between the time of writing [1] and landing it. This
change adds `_LIBCPP_CONSTEXPR_AFTER_CXX17` to the new overload too.
[1] https://reviews.llvm.org/rL358423
[2] https://reviews.llvm.org/rL358252
Differential Revision: https://reviews.llvm.org/D60724
llvm-svn: 358725
|
|
|
|
|
|
| |
This change authored by Paolo Torres <t-pator@microsoft.com>
llvm-svn: 358698
|