The clang assertion causing these tests failing with sanitizer is fixed
in r295794. All the bots running libcxx tests should be upgraded and
running the compiler with the fix.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296385 91177308-0d34-0410-b5e6-96231b3b80d8
This reverts SVN r295329. Although `__libcpp_thread_sleep_for` should
be alertable, the implementation causes a large regression in the test
suite. Add a FIXME item there for now to get the test suite in a better
state before attempting to fix that behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295561 91177308-0d34-0410-b5e6-96231b3b80d8
When building with MSVCRT, we need to manually provide the type
promoting overloads to allow the correct type deduced invocation for
signbit(Int) and fpclassify(int).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295559 91177308-0d34-0410-b5e6-96231b3b80d8
On certain targets, enumerations may be smaller than an `unsigned long`.
Use an explicitly sized enumeration.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295558 91177308-0d34-0410-b5e6-96231b3b80d8
The path would previously get an extra leading space as the arguments
would be parsed when generating the final command to run. Pretokenise
the arguments to permit proper quoting of the paths. This avoids a
number of ignoring non-existent path warnings from clang.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295511 91177308-0d34-0410-b5e6-96231b3b80d8
GCC 7.0.1 started warning that __attribute__((__strong__)) is depricated.
This patch switches to using inline namespace with GCC instead. I believe
this wasn't done originally in order to support older GCC versions w/o
support for inline namespaces, or because earlier versions of GCC warned
users that the STL was using an inline namespace (even though it shouldn't affect users).
However I believe all of the above problems are gone for GCC 4.9 and greater.
Therefore switching to using inline namespaces instead of using __strong__
is the most correct behavior.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295428 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch implements [P0003R5](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html) which removes exception specifications from C++17.
The only changes to the library are removing `set_unexpected`, `get_unexpected`, `unexpected`, and `unexpected_handler`. These functions can be re-enabled in C++17 using `_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS`.
@mclow.lists what do you think about removing stuff is this way?
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: mclow.lists, cfe-commits
Differential Revision: https://reviews.llvm.org/D28172
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295406 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch fixes http://llvm.org/PR31938. The description below is copy/pasted from the bug:
The standard says:
template<class charT, class traits = char_traits<charT>,
class Allocator = allocator<charT>>
class basic_string {
using value_type = typename traits::char_type;
// ...
basic_string(const charT* s, const Allocator& a = Allocator());
};
libc++ actually chooses to declare the constructor as
basic_string(const value_type* s, const Allocator& a = Allocator());
The implicit deduction guides from class template argument deduction make what was previously an implementation detail visible:
std::basic_string s = "foo"; // error, can't deduce charT.
The constructor in question is in the libc++ DSO, but fortunately it looks like fixing this will not result in an ABI break.
@rsmith How does this look? I did more than just the constructors mentioned in the PR, but IDK how far to take it.
Reviewers: mclow.lists, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits, rsmith
Differential Revision: https://reviews.llvm.org/D29863
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295393 91177308-0d34-0410-b5e6-96231b3b80d8
On Windows, we were using `Sleep` which is not alertable. This means
that if the thread was used for a user APC or WinProc handling and
thread::sleep was used, we could potentially dead lock. Use `SleepEx`
with an alertable sleep, resuming until the time has expired if we are
awoken early.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295329 91177308-0d34-0410-b5e6-96231b3b80d8
clang cannot properly handle __declspec and __attribute__ on classes
right now. This prevents the shared_mutex tests from working. Disable
the use of the annotation on COFF targets.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294958 91177308-0d34-0410-b5e6-96231b3b80d8
The previous changes missed the change to include/cmath. These changes
allow some of the rand.distribution tests to pass on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294957 91177308-0d34-0410-b5e6-96231b3b80d8
Pull in the math functions from ucrt 14+ after auditing the library. It
seems that they are now complete for C99 math. Fixes more windows
tests!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294918 91177308-0d34-0410-b5e6-96231b3b80d8
wchar_t is not as portable as char32_t. On Windows, wchar_t is
16-bytes and on Linux 32-bits. The conversion to utf8 causes the
characters to exceed the limits on char16_t, resulting in tautological
comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294917 91177308-0d34-0410-b5e6-96231b3b80d8
This test explicitly is checking the behaviour of std::thread and
pthread interactions. This requires pthreads. Add an appropriate
requirement.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294903 91177308-0d34-0410-b5e6-96231b3b80d8
The newer versions of ucrt have the math routines. Use the CRT version
to determine if we should include the math routines. Fixes two tests
for Windows.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294899 91177308-0d34-0410-b5e6-96231b3b80d8
CloudABI has gained the setlocale() function in the meantime, meaning
there is no longer a need to conditionalize this.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294833 91177308-0d34-0410-b5e6-96231b3b80d8
CloudABI does provide unistd.h, but doesn't define __unix__. We need to
include this header file to make hardware_concurrency work.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294832 91177308-0d34-0410-b5e6-96231b3b80d8
This recommits r294707 with additional fixes. The main difference is
libc++ now correctly builds without any ABI library.
exception.cpp is a bloody mess. It's full of confusing #ifdef branches for
each different ABI library we support, and it's getting unmaintainable.
This patch breaks down exception.cpp into multiple different header files,
roughly one per implementation. Additionally it moves the definitions of
exceptions in new.cpp into the correct implementation header.
This patch also removes an unmaintained libc++abi configuration.
This configuration may still be used by Apple internally but there
are no other possible users. If it turns out that Apple still uses
this configuration internally I will re-add it in a later commit.
See http://llvm.org/PR31904.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294730 91177308-0d34-0410-b5e6-96231b3b80d8
This test validates that the lock_guard is declared variadically across
C++03 and C++11. Given the lack of stable ABI on Windows and the fact
that the RTTI encoding on Windows is different, XFAIL it on that target.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294720 91177308-0d34-0410-b5e6-96231b3b80d8
When running the test under clang-cl, we do not report `__GNUC__`, which
is needed to supress the warnings which are being treated as errors.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294719 91177308-0d34-0410-b5e6-96231b3b80d8
When running the tests on Windows with a debug build, _DEBUG must be
added to the flags prior to the -target as the forced inclusion of a
header will prevent the compile test for the flag to fail.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294716 91177308-0d34-0410-b5e6-96231b3b80d8
This patch fixes a regression where libc++ didn't correctly
select the system libc++abi when no in-tree version was found.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294712 91177308-0d34-0410-b5e6-96231b3b80d8