Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Re-branch stable from swift-5.1-branch #1

Merged
merged 349 commits into from
Feb 20, 2019
Merged

Re-branch stable from swift-5.1-branch #1

merged 349 commits into from
Feb 20, 2019

Conversation

shahmishal
Copy link
Member

No description provided.

mclow and others added 30 commits October 6, 2018 15:07
…event UB when overflowing. Also add a UBSAN notification that we're ffine with unsigned overflow. This fixes PR#32617. Thanks to Vincent & Christoph for their help with this issue.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343996 91177308-0d34-0410-b5e6-96231b3b80d8
PR38682 added a test to check for a race condition in std::future.
Part of the fix is part of the dylib, but there is no released version
of mac OS X that ships a dylib containing the fix. Hence, this test can
(and sometimes does) when testing on OS X. This commit marks the test
as unsupported to avoid spurious failures.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344053 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Scoped capabilities need to be annotated as such, otherwise the thread
safety analysis won't work as intended.

Fixes PR39234.

Reviewers: ldionne

Reviewed By: ldionne

Subscribers: christof, libcxx-commits

Differential Revision: https://reviews.llvm.org/D53049

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344096 91177308-0d34-0410-b5e6-96231b3b80d8
This fixes a test failure caused by D53049.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344192 91177308-0d34-0410-b5e6-96231b3b80d8
While __cplusplus was only used a few dozen times, TEST_STD_VAR is used
more than 2000 times. So we replace the former by the latter for
consistency in the tests. There should be no functional change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344194 91177308-0d34-0410-b5e6-96231b3b80d8
There are two cases:
1. The library has all it needs to provide align_val_t and the
new/delete overloads needed to support aligned allocation.
2. The compiler has actually turned the language feature on.

There are times where libc++ needs to distinguish between the two.

This patch adds the additional macro
_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION which denotes when case (1)
does not hold. _LIBCPP_HAS_NO_ALIGNED_ALLOCATION is defined whenever
_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION is defined, or when the
compiler has not enabled the language feature.

Additionally this patch cleans up a number of other macros related
to detection of aligned allocation machinery.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344207 91177308-0d34-0410-b5e6-96231b3b80d8
It was replaced with the better named
_LIBCPP_HAS_NO_BUILTIN_OVERLOADED_OPERATOR_NEW_DELETE.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344214 91177308-0d34-0410-b5e6-96231b3b80d8
…_has_XXX intrinsics when implementing type traits. Thanks to Richard Smith for the patch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344254 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Benchmarks for construct, copy, move, swap, destroy and invoke, with 8
different input states.
For the cases that matter, it tests with and without allowing constant
value propagation from construction into the operation tested.

This also adds helper functions to generate the cartesian product of
different configurations and generate benchmarks for all of them.

Reviewers: EricWF

Subscribers: christof, ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D53087

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344415 91177308-0d34-0410-b5e6-96231b3b80d8
…till incomplete; there will be more patches coming. Reviewed as D51762

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344529 91177308-0d34-0410-b5e6-96231b3b80d8
…clang don't complain. I'm looking at you, clang 5.0.1

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344535 91177308-0d34-0410-b5e6-96231b3b80d8
libc++ has dropped support for Mac OS 10.6 for a while, and we don't
have any testers set up for that OS.

This commit puts in an error message so that people can reach out to
the libc++ maintainers in case support for 10.6 is still expected (as
opposed to silently failing in weird ways). We can completely drop
support for 10.6 and remove the error message some time in the future
when we're sure that nobody is relying on it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344576 91177308-0d34-0410-b5e6-96231b3b80d8
…C++20"

Revert r344535 "Wrap up the new chrono literals in an #ifdef..."
Revert r344546 "Mark a couple of test cases as 'C++17-only'..."

Some of the buildbot failures were masked by another error,
and this one was probably missed.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344580 91177308-0d34-0410-b5e6-96231b3b80d8
Reverted too much in r344580.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344582 91177308-0d34-0410-b5e6-96231b3b80d8
…apple's clang. Reviewed as D51762

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344627 91177308-0d34-0410-b5e6-96231b3b80d8
That macro has been defined to _LIBCPP_HIDE_FROM_ABI_AFTER_V1 for many
weeks now, so we're actually replacing uses of it for uses of
_LIBCPP_HIDE_FROM_ABI_AFTER_V1 directly.

This should not change or break anything since the two macros are
100% equivalent, unless somebody is (incorrectly!) relying on
_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY being defined.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344641 91177308-0d34-0410-b5e6-96231b3b80d8
This reduces code duplication a tiny bit.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344642 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Running the test suite with -a will now properly show all the executed
commands. The reports also include the environment under which the test
is being executed, which is helpful for reproducing issues.

Reviewers: EricWF

Subscribers: christof, dexonsmith, libcxx-commits

Differential Revision: https://reviews.llvm.org/D53215

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344700 91177308-0d34-0410-b5e6-96231b3b80d8
mgorny and others added 28 commits December 17, 2018 19:13
Remove the two test cases for \xDA and \xFA with UTF-8 locale, as both
characters alone are invalid in UTF-8 (short sequences).  Upon removing
them, the test passes on Linux again (and also on NetBSD, after adding
appropriate locale configuration).

Differential Revision: https://reviews.llvm.org/D55746

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349378 91177308-0d34-0410-b5e6-96231b3b80d8
Add a target_info definition for NetBSD.  The definition is based
on the one used by FreeBSD, with libcxxrt replaced by libc++abi,
and using llvm-libunwind since we need to use its unwinder
implementation to build anyway.

Additionally, XFAIL the 30 tests that fail because of non-implemented
locale features.  According to the manual, NetBSD implements only
LC_CTYPE part of locale handling.  However, there is a locale database
in the system and locale specifications are validated against it,
so it makes sense to list the common locales as supported.

If I'm counting correctly, this change enables additional 43 passing
tests.

Differential Revision: https://reviews.llvm.org/D55767

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349379 91177308-0d34-0410-b5e6-96231b3b80d8
I just realized I had always been reading this wrong because of the lack
of indentation, so I'm re-indenting this properly.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349408 91177308-0d34-0410-b5e6-96231b3b80d8
This test was initially marked as XFAIL using `XFAIL: macosx10.YY`, and
was then moved to `UNSUPPORTED: macosx10.YY`. The intent is to mark the
test as XFAILing when a deployment target older than macosx10.14 is used,
and the right way to do this is `XFAIL: availability=macosx10.YY`.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349426 91177308-0d34-0410-b5e6-96231b3b80d8
…tests

I forgot that those don't behave like Clang trunk, again.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349427 91177308-0d34-0410-b5e6-96231b3b80d8
That test doesn't fail anymore since r349378, since the assertions that
r349378 removed must have been bugs in the dylib at some point.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349484 91177308-0d34-0410-b5e6-96231b3b80d8
…hange cwchar.pass.cpp to avoid constructing a couple things from zero - since apparently they can be enums in some weird C library. NFC there, either, since the values were never used.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349522 91177308-0d34-0410-b5e6-96231b3b80d8
Makes libc++ behavior consistent between C++03 and C++11.

Can use `decltype` in C++03 because `include/__config` defines a macro when
`decltype` is not available.

Reviewers: mclow.lists, EricWF, erik.pilkington, ldionne

Reviewed By: ldionne

Subscribers: dexonsmith, cfe-commits, howard.hinnant, ldionne, christof, jkorous, Quuxplusone

Differential Revision: https://reviews.llvm.org/D48753


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349676 91177308-0d34-0410-b5e6-96231b3b80d8
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 introduces checks verifying that any iteration will return elements
exactly from a set of valid values and without repetition, but in no
particular order.

Reviewed as https://reviews.llvm.org/D54838.
Thanks to Andrey Maksimov for the patch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349780 91177308-0d34-0410-b5e6-96231b3b80d8
…c format

This patch implements path::compare according to the current spec. The
only observable change is the ordering of "/foo" and "foo", which orders
the two paths based on having or not having a root directory (instead
of lexically comparing "/" to "foo").

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349881 91177308-0d34-0410-b5e6-96231b3b80d8
This patch adds std::chrono::file_clock, but without breaking the
existing ABI for std::filesystem.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349883 91177308-0d34-0410-b5e6-96231b3b80d8
This prevents things like:

using namespace std::filesystem;
auto x = L"a/b" == std::string("a/b");

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349884 91177308-0d34-0410-b5e6-96231b3b80d8
…slashes

path("/dir/").lexically_relative("/dir"); now returns "." instead of ""

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349885 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
We already have the negation of that as _LIBCPP_HAS_NONUNIQUE_TYPEINFO.
Having both defined is confusing, since only one of them is used.

Reviewers: EricWF, mclow.lists

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

Differential Revision: https://reviews.llvm.org/D54537

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349947 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Tests marked with the flaky attribute ("FLAKY_TEST.")
can still report false positives in local tests and on the
NetBSD buildbot.

Additionally a number of tests (probably all threaded
ones) unmarked with the flaky attribute is flaky on
NetBSD.

An ideal solution on the libcxx side would be to raise
max retries for NetBSD and mark failing tests with
the flaky flag, however this adds more maintenance
burden and constant monitoring of flaky tests.

Reduce the work and handle flaky tests as more flaky
on NetBSD and allow flakiness  of other tests on
NetBSD.

Reviewers: mgorny, EricWF

Reviewed By: mgorny

Subscribers: christof, llvm-commits, libcxx-commits

Differential Revision: https://reviews.llvm.org/D56064

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@350170 91177308-0d34-0410-b5e6-96231b3b80d8
…tor range with const-ness mismatch.

We already have a specialization that will use memcpy for construction
of trivial types from an iterator range like

    std::vector<int>(int *, int *);

But if we have const-ness mismatch like

    std::vector<int>(const int *, const int *);

we would use a slow path that copies each element individually. This change
enables the optimal specialization for const-ness mismatch. Fixes PR37574.

Contributions to the patch are made by Arthur O'Dwyer, Louis Dionne.

rdar://problem/40485845

Reviewers: mclow.lists, EricWF, ldionne, scanon

Reviewed By: ldionne

Subscribers: christof, ldionne, howard.hinnant, cfe-commits

Differential Revision: https://reviews.llvm.org/D48342

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@350583 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 354589c)
Summary:
A few places in the library seem to behave unexpectedly when the library
is compiled or used with exceptions disabled. For example, not throwing
an exception when a pointer is NULL can lead us to dereference the pointer
later on, which is UB. This patch fixes such occurences.

It's hard to tell whether there are other places where the no-exceptions
mode misbehaves like this, because the replacement for throwing an
exception does not always seem to be abort()ing, but at least this
patch will improve the situation somewhat.

See http://lists.llvm.org/pipermail/libcxx-dev/2019-January/000172.html

Reviewers: mclow.lists, EricWF

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

Differential Revision: https://reviews.llvm.org/D57761

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353850 91177308-0d34-0410-b5e6-96231b3b80d8
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.