| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG2510 makes tag types like allocator_arg_t explicitly default
constructible instead of implicitly default constructible. It also
makes the constructors for std::pair and std::tuple conditionally
explicit based on the explicit-ness of the default constructibility
for the pair/tuple's elements.
This was previously committed as r372777 and reverted in r372832 due to
the commit breaking LLVM's build in C++14 mode. This issue has now been
addressed.
Reviewers: mclow.lists
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65161
llvm-svn: 372983
|
|
|
|
|
|
|
|
|
| |
Users should only get the assert() macros if they explicitly include
them.
Found after switching from the GNU C++ stdlib to the LLVM C++ stdlib.
llvm-svn: 372963
|
|
|
|
|
|
|
|
|
| |
We don't support GCC 4 and older according to the documentation, so
we should pretend it doesn't exist.
This is a re-application of r372787.
llvm-svn: 372916
|
|
|
|
|
|
|
|
| |
This declaration was previously missing despite appearing in the
synopsis. Users are still required to include <ostream> to get the
definition of the streaming operator.
llvm-svn: 372909
|
|
|
|
|
|
| |
comparison operators
llvm-svn: 372907
|
|
|
|
|
|
| |
as https://reviews.llvm.org/D67944
llvm-svn: 372896
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also reverts:
- r372778: [libc++] Implement LWG 3158
- r372782: [libc++] Try fixing tests that fail on GCC 5 and older
- r372787: Purge mentions of GCC 4 from the test suite
Reason: the change breaks compilation of LLVM with libc++, for details see
http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html
llvm-svn: 372832
|
|
|
|
|
|
|
| |
We don't support GCC 4 and older according to the documentation, so
we should pretend it doesn't exist.
llvm-svn: 372787
|
|
|
|
| |
llvm-svn: 372782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: As suggested by @ldionne in D66178, this patch removes C++03 variadics //only//. Following patches will apply more updates.
Reviewers: ldionne, EricWF, mclow.lists
Subscribers: christof, dexonsmith, libcxx-commits, ldionne
Tags: #libc
Differential Revision: https://reviews.llvm.org/D67675
llvm-svn: 372780
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG 3158 marks the allocator_arg_t constructor of std::tuple as
conditionnally explicit based on whether the default constructors
of the tuple's members are explicitly default constructible.
Reviewers: EricWF, mclow.lists
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65232
llvm-svn: 372778
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG2510 makes tag types like allocator_arg_t explicitly default
constructible instead of implicitly default constructible. It also
makes the constructors for std::pair and std::tuple conditionally
explicit based on the explicit-ness of the default constructibility
for the pair/tuple's elements.
Reviewers: mclow.lists, EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65161
llvm-svn: 372777
|
|
|
|
|
|
| |
They do fail on AppleClang 10.0.0, but not AppleClang 10.0.1
llvm-svn: 372632
|
|
|
|
| |
llvm-svn: 372620
|
|
|
|
|
|
|
|
| |
conditionally noexcept"; this breaks the gcc5 bot for C++11
This reverts commit c8ca15c95c4c0d6d1356500d5fe49a319ea4ca01.
llvm-svn: 372546
|
|
|
|
|
|
| |
noexcept
llvm-svn: 372539
|
|
|
|
|
|
|
|
|
|
| |
pthread_cond_clockwait() where available""
With the fix for non-Linux.
This reverts commit c1c519d2f1a66dd2eeaa4c321d8d7b50f623eb71.
llvm-svn: 372242
|
|
|
|
|
|
|
|
| |
available"
This reverts commit 5e37d7f9ff257ec62d733d3d94b11f03e0fe51ca.
llvm-svn: 372034
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
std::condition_variable is currently implemented via
pthread_cond_timedwait() on systems that use pthread. This is
problematic, since that function waits by default on CLOCK_REALTIME
and libc++ does not provide any mechanism to change from this
default.
Due to this, regardless of if condition_variable::wait_until() is
called with a chrono::system_clock or chrono::steady_clock parameter,
condition_variable::wait_until() will wait using CLOCK_REALTIME. This
is not accurate to the C++ standard as calling
condition_variable::wait_until() with a chrono::steady_clock parameter
should use CLOCK_MONOTONIC.
This is particularly problematic because CLOCK_REALTIME is a bad
choice as it is subject to discontinuous time adjustments, that may
cause condition_variable::wait_until() to immediately timeout or wait
indefinitely.
This change fixes this issue with a new POSIX function,
pthread_cond_clockwait() proposed on
http://austingroupbugs.net/view.php?id=1216. The new function is
similar to pthread_cond_timedwait() with the addition of a clock
parameter that allows it to wait using either CLOCK_REALTIME or
CLOCK_MONOTONIC, thus allowing condition_variable::wait_until() to
wait using CLOCK_REALTIME for chrono::system_clock and CLOCK_MONOTONIC
for chrono::steady_clock.
pthread_cond_clockwait() is implemented in glibc (2.30 and later) and
Android's bionic (Android API version 30 and later).
This change additionally makes wait_for() and wait_until() with clocks
other than chrono::system_clock use CLOCK_MONOTONIC.<Paste>
llvm-svn: 372016
|
|
|
|
| |
llvm-svn: 371925
|
|
|
|
| |
llvm-svn: 371886
|
|
|
|
| |
llvm-svn: 371884
|
|
|
|
| |
llvm-svn: 371880
|
|
|
|
| |
llvm-svn: 371874
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exceptions are disabled.
The patch was reverted due to some confusion about non-movable types. ie
types
that explicitly delete their move constructors. However, such types do
not meet
the requirement for `MoveConstructible`, which is required by
`std::vector`:
Summary:
`std::vector<T>` is free choose between using copy or move operations
when it
needs to resize. The standard only candidates that the correct exception
safety
guarantees are provided. When exceptions are disabled these guarantees
are
trivially satisfied. Meaning vector is free to optimize it's
implementation by
moving instead of copying.
This patch makes `std::vector` unconditionally move elements when
exceptions are
disabled. This optimization is conforming according to the current
standard wording.
There are concerns that moving in `-fno-noexceptions`mode will be a
surprise to
users. For example, a user may be surprised to find their code is slower
with
exceptions enabled than it is disabled. I'm sympathetic to this
surprised, but
I don't think it should block this optimization.
Reviewers: mclow.lists, ldionne, rsmith
Reviewed By: ldionne
Subscribers: zoecarver, christof, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D62228
llvm-svn: 371867
|
|
|
|
|
|
| |
time Init::Init is called. Fixes PR#43300
llvm-svn: 371864
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is an exact duplicate of https://reviews.llvm.org/D65609, except
that it uses the newly introduced testing framework to detect if gdb is present
so that the tests won't fail on machines without gdb.
Reviewers: echristo, EricWF
Subscribers: christof, ldionne, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67238
llvm-svn: 371131
|
|
|
|
|
|
|
|
|
| |
If LLVM_CODESIGNING_IDENTITY is set, test executables need to be
codesigned.
Differential Revision: https://reviews.llvm.org/D66496
llvm-svn: 371126
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: echristo, EricWF
Subscribers: mgorny, christof, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67194
llvm-svn: 371120
|
|
|
|
|
|
|
|
|
|
| |
are disabled."
This reverts r370502, which broke the use case of a copy-only T (with a
deleted move constructor) when exceptions are disabled. Until we figure
out the right behavior, I'm reverting the commit.
llvm-svn: 371068
|
|
|
|
|
|
| |
See https://reviews.llvm.org/D62228#1658620
llvm-svn: 371067
|
|
|
|
|
|
| |
macros
llvm-svn: 370900
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed anytime we need to clamp an arbitrary floating point
value to an integer type.
Thanks to Eric Fiselier for the patch.
Differential Revision: https://reviews.llvm.org/D66836
llvm-svn: 370891
|
|
|
|
|
|
| |
This reverts commit d8c9f2f572fe06a34ccfc28ee9223b64d7d275d3.
llvm-svn: 370553
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Also add a test suite.
Reviewers: EricWF
Subscribers: christof, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65609
Run a pep8 formatter.
Run pep8 formatter.
Convert to PEP8, address other comments from code review.
llvm-svn: 370551
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
`std::vector<T>` is free choose between using copy or move operations when it needs to resize. The standard only candidates that the correct exception safety guarantees are provided. When exceptions are disabled these guarantees are trivially satisfied. Meaning vector is free to optimize it's implementation by moving instead of copying.
This patch makes `std::vector` unconditionally move elements when exceptions are disabled.
This optimization is conforming according to the current standard wording.
There are concerns that moving in `-fno-noexceptions`mode will be a surprise to users. For example, a user may be surprised to find their code is slower with exceptions enabled than it is disabled. I'm sympathetic to this surprised, but I don't think it should block this optimization.
Reviewers: mclow.lists, ldionne, rsmith
Reviewed By: ldionne
Subscribers: zoecarver, christof, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D62228
llvm-svn: 370502
|
|
|
|
|
|
|
|
| |
This was reported as part of a bug report that ended up being a
duplicate for r340609, but I'm adding the test case since it's
ever so slightly different from what we had before.
llvm-svn: 370109
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r369429, I hoisted a floating point computation to a variable in order
to remove a warning. However, it turns out this doesn't play well with
floating point arithmetic. This commit reverts r369429 and instead casts
the result of the floating point computation to remove the warning.
Whether hoisting the computaiton to a variable should give the same
result can be investigated independently.
llvm-svn: 369693
|
|
|
|
| |
llvm-svn: 369672
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D66544
llvm-svn: 369597
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM uses .h as its extension for header files.
Files renamed using:
for f in libcxx/test/support/*.hpp; do git mv $f ${f%.hpp}.h; done
References to the files updated using:
for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do
a=$(basename $f);
echo $a;
rg -l $a libcxx | xargs sed -i '' "s/$a/${a%.hpp}.h/";
done
HPP include guards updated manually using:
for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do
echo ${f%.hpp}.h ;
done | xargs mvim
Differential Revision: https://reviews.llvm.org/D66104
llvm-svn: 369481
|
|
|
|
|
|
| |
Updated all the heap tests to check this.
llvm-svn: 369448
|
|
|
|
|
|
|
|
|
|
| |
On systems where sizeof(long) == sizeof(int)
the current tests failed. This commit updates
those tests to work on all systems.
std::abs has specific long specializations
which can be used instead.
llvm-svn: 369437
|
|
|
|
|
|
|
|
|
|
| |
By stashing the computation of `E::max() - E::min()` in a variable, we
avoid the warning introduced in r367497. Note that we use `auto` to
avoid having to deduce the type of the computation, which is not a
problem since Clang provides `auto` as an extension even in C++03 (and
we disable warnings related to using C++11 extensions in the test suite).
llvm-svn: 369429
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The resolution of LWG 3199 makes sure that input-streaming into an empty bitset
does not set the failbit on the input stream.
Reviewers: mclow.lists, EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65105
llvm-svn: 369422
|
|
|
|
|
|
| |
This test doesn't fail on all patch levels of AppleClang 11
llvm-svn: 369420
|
|
|
|
|
|
|
|
|
| |
On some systems char is unsigned.
If that is the case, we will now
test signed char twice in std::abs.
NFC. Fixes the build bots.
llvm-svn: 369413
|
|
|
|
|
|
|
|
| |
In r368882, I enabled those tests for all AppleClang's above version 9.
However, it turns out that the feature is only supported starting with
AppleClang 10.0.1, not AppleClang 10.0.0. This commit fixes that hole.
llvm-svn: 369409
|
|
|
|
|
|
|
|
| |
Implement LWG Issue 2735 by adding std::abs
tests for several types and checking their
return value. NFC.
llvm-svn: 369394
|
|
|
|
| |
llvm-svn: 369280
|