Commit Graph

4366 Commits

Author SHA1 Message Date
Marshall Clow
8437dbd021 Another test for LWG2952
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318126 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-14 01:18:36 +00:00
Marshall Clow
52728778fa Implement LWG2950: std::byte operations are misspecified
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318125 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-14 01:14:53 +00:00
Marshall Clow
e1cfe7a7f6 Implement LWG2952: iterator_traits should work for pointers to cv T
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318119 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-14 00:03:10 +00:00
Marshall Clow
928f2866ec Put the status in the wrong column
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318012 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13 04:15:39 +00:00
Marshall Clow
edd7e051d4 Implement P0550R2: Transformation Trait remove_cvref
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318011 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13 03:59:22 +00:00
Marshall Clow
7513814cb6 Two more papers from Albuquerque
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318000 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-12 18:52:16 +00:00
Marshall Clow
55eda5dfcc Updated C++2a status page with new features/defects approved in Albuquerque.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-12 18:48:42 +00:00
Alex Lorenz
b4a34c08ac Add _LIBCPP_INLINE_VISIBILITY to __compressed_pair_elem members
The commit r300140 changed the implementation of compressed_pair, but didn't add
_LIBCPP_INLINE_VISIBILITY to the constructors and get members of the
compressed_pair_elem class. This patch adds the visibility annotation.

I didn't find a way to test this change with libc++ regression tests.

rdar://35352579

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


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317816 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09 17:54:49 +00:00
Volodymyr Sapsai
eada02443a [libcxx] Mark test cxa_deleted_virtual.pass.cpp as failing for previous libcxx versions.
r313500 added a fix for undefined "___cxa_deleted_virtual" symbol.
Previous libcxx versions don't have the fix and corresponding test
should be failing.

rdar://problem/34521053

Reviewers: EricWF, mclow.lists, ahatanak

Reviewed By: ahatanak

Subscribers: mehdi_amini, cfe-commits

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



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317734 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 22:30:29 +00:00
Marshall Clow
56a3f4a9d1 Added include for <cassert>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317722 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 20:25:47 +00:00
Eric Fiselier
7e73ea873f Teach test suite about C++2a dialect flag.
This patch teaches the test suite configuration about the -std=c++2a
flag. And, since it's the newest dialect, change the test suite to
choose it, if possible, by default.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:26:23 +00:00
Eric Fiselier
6efb1c19a7 Change test suite to support c++17 dialect flag instead of c++1z.
This patch changes the test suite to attempt and prefer -std=c++17 over
-std=c++1z. It also fixes the REQUIRES and UNSUPPORTED lit markers
to refer to c++17 over c++1z.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:20:58 +00:00
Marshall Clow
2e390822e5 Change a bunch of comments from C++1z to C++17. NFC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317212 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 15:03:25 +00:00
Roger Ferrer Ibanez
79078a328e Mark tests as unsupported in C++98 as well
Differential Revision: https://reviews.llvm.org/D38362



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317210 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 15:01:43 +00:00
Marshall Clow
e3853bfecd Mark Endian as 'in progress'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317209 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 14:53:08 +00:00
Dan Albert
c3f25abd63 Revert "[libc++] Don't alias quick_exit if __ANDROID_API__ < 21"
Broke the Darwin build bots.

This reverts commit f56f1bba1a.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317142 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01 23:43:07 +00:00
Dan Albert
f56f1bba1a [libc++] Don't alias quick_exit if __ANDROID_API__ < 21
Summary:
quick_exit() and at_quick_exit() were introduced in android NDK 21:
https://android.googlesource.com/platform/prebuilts/ndk/+/dev/platform/sysroot/usr/include/stdlib.h#55

This CL conditions `_LIBCPP_HAS_QUICK_EXIT` on `__ANDROID_API__ >= 21`.  The only place this macro is used is in some using declarations: `using ::quick_exit`, `using ::at_quick_exit`.

Also, add a missing include to sys/cdefs.h which is what defines `__BIONIC__`.

Reviewers: thakis, danalbert, EricWF

Reviewed By: danalbert

Subscribers: srhines, krytarowski

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317124 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01 21:17:56 +00:00
Marshall Clow
d422c95317 More statuses, a new patch, too
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01 04:03:35 +00:00
Marshall Clow
9a675c6dae Update the synopsis to match the P/R of 2945. No code changes.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01 01:27:25 +00:00
Marshall Clow
67371161a0 Fix broken links; update more issues.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31 00:19:47 +00:00
Marshall Clow
c6934a38d5 Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316969 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31 00:05:17 +00:00
Marshall Clow
772a6d4185 Add more fuzzing bits: partial_sort_copy, partition_copy, unique, unique_copy. No functional change to libc++; this is all test infastructure
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316951 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 19:51:58 +00:00
Eric Fiselier
a4c272d82f Implement LWG 3013 - some filesystem members should not be noexcept.
LWG 3013 points out that the constructors and increment members
of the directory iterators need to allocate, and therefore cannot
be marked noexcept.

It also points out that `is_empty` and `copy` likely need to allocate
as well, and as such can also not be noexcept.

This patch speculatively implements the resolution removing noexcept,
because libc++ does indeed have the possibility of throwing on allocation
failure.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 18:59:59 +00:00
Eric Fiselier
fba9cd8c9e Fix PR35078 - recursive directory iterator's increment method throws incorrectly.
The guts of the increment method for recursive_directory_iterator
was failing to pass an error code object to calls to status/symlink_status,
which can throw under certain conditions.

This patch fixes the issues by correctly propagating the error codes.
However the noexcept still needs to be removed from the signature, as
mentioned in LWG 3014, but that change will be made in a separate commit.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316939 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 18:43:21 +00:00
Marshall Clow
3b8f03d964 Mark test as unsupported on C++98/03, since it uses move_iterator
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316917 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 16:07:59 +00:00
Marshall Clow
c3fa9655a4 Fix PR#35119 : set_union misbehaves with move_iterators. Thanks to Denis Yaroshevskiy for both the bug report and the fix.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316914 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 15:50:00 +00:00
Marshall Clow
9bc42cf1d7 Initial triage
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316874 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-29 21:57:58 +00:00
Marshall Clow
a12eafc284 Update status of 2950
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316873 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-29 21:43:30 +00:00
Marshall Clow
23d0bd265d Issues to be voted on in ABQ
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316867 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-29 19:02:00 +00:00
Marshall Clow
76929f6825 Mark string_view's constructor from (ptr,len) as noexcept (an extension). Update the tests to check this (and other noexcept bits
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316456 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24 16:30:06 +00:00
Marshall Clow
66db4e4fdd Mark string_view literals as 'noexcept'. Fixes PR#25054. Thanks to Pavel K for the bug report.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24 14:06:00 +00:00
Marshall Clow
f45f32b025 More fuzzing interfaces
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316394 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-23 23:19:30 +00:00
Marshall Clow
b91e69c546 Fix misguided error message in debug mode. No functional change. Fixes PR#34966
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-23 16:46:44 +00:00
Marshall Clow
24c7353aa9 Fix an unsigned integer overflow in regex that lead to a bad memory access. Found by OSS-Fuzz
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316191 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-19 22:10:41 +00:00
Marshall Clow
278c0ba4a6 Fix UB - signed integer overflow in regex. Thanks to Tim Shen for the patch. Reviewed as https://reviews.llvm.org/D39066
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-19 17:39:16 +00:00
Marshall Clow
2ac694b611 Fix a think-o in the design of the stable_XXX sort tests; only shows up for test cases > 255 elements
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316125 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18 20:40:57 +00:00
Marshall Clow
69447430a3 Fix regex bug with ^\W. Thanks to Tim Shen for the patch. Reviewed as https://reviews.llvm.org/D37955
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18 16:49:22 +00:00
Eric Fiselier
1aeb40080d Refactor std::list node allocation logic.
The logic to allocate a node within std::list was repeated
in a bunch of places. This is unneeded. This patch refactors
the shared logic into a single function to reduce duplication.

This patch is part of a set to clean up node construction in
general, but refactoring construction requires some more work
to make it work cleanly in C++03

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316021 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-17 19:12:23 +00:00
Eric Fiselier
9fdd86763e fix shadowing warnings in new tests, try 2
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316009 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-17 16:06:42 +00:00
Eric Fiselier
d93991fedd fix shadowing warnings in new tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315997 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-17 13:45:20 +00:00
Eric Fiselier
5ccf043379 Refactor _LIBCPP_<LITTLE|BIG>_ENDIAN
Previously this macro used 0/1 to indicate if it was set.
This is unlike all other libc++ configuration macros which
use ifdef/ifndef.

This patch makes this macro consistent with everything else.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315995 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-17 13:16:01 +00:00
Eric Fiselier
94c3917960 [libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back.
Summary:
The constructors `vector(Iter, Iter, Alloc = Alloc{})` and `assign(Iter, Iter)` don't correctly perform EmplaceConstruction from the result of dereferencing the iterator. This results in them performing an additional and unneeded copy.

This patch addresses the issue by correctly using `emplace_back` in C++11 and newer.

There are also some bugs in our `insert` implementation, but those will be handled separately. 

@mclow.lists We should probably merge this into 5.1, agreed?

Reviewers: mclow.lists, dlj, EricWF

Reviewed By: mclow.lists, EricWF

Subscribers: cfe-commits, mclow.lists

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315994 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-17 13:03:17 +00:00
Roman Lebedev
5cf53b55e6 Fix last_write_time.pass.cpp to work with clang-3.9 and earlier
At least with clang-3.9 and earlier, -Wunknown-pragmas is also needed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315882 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-15 21:52:53 +00:00
Roman Lebedev
4b05db4286 Really do make sure that last_write_time.pass.cpp still works with old clang
I *did* try to check that such kind of an issue was not introduced
by the rL315874, but clearly i failed to finish verification.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315876 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-15 20:46:12 +00:00
Roman Lebedev
0fdc4c9c6b Silence clang's -Wtautological-constant-compare in last_write_time.pass.cpp
Previously this broke the builders, when D38101 was committed.
Silence the warning so that it can be re-landed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315874 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-15 20:12:42 +00:00
Benjamin Kramer
5384fd8538 Placate unused variable warnings uncovered by improvements to clang's -Wunused-variable
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315809 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-14 15:52:38 +00:00
Marshall Clow
c85f85a56b More fuzzing infastructre - regex
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315582 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 14:48:09 +00:00
Roger Ferrer Ibanez
7c31c8407b Mark test as a long-test
Differential Revision: https://reviews.llvm.org/D38452



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315570 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 08:46:05 +00:00
Roger Ferrer Ibanez
2f494f7331 Remove unneeded typename from test
Differential Revision: https://reviews.llvm.org/D38628



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-10 07:42:19 +00:00
Shoaib Meenai
18dba06924 [libc++] Support Microsoft ABI without vcruntime headers
The vcruntime headers are hairy and clash with both libc++ headers
themselves and other libraries. libc++ normally deals with the clashes
by deferring to the vcruntime headers and silencing its own definitions,
but for clients which don't want to depend on vcruntime headers, it's
desirable to support the opposite, i.e. have libc++ provide its own
definitions.

Certain operator new/delete replacement scenarios are not currently
supported in this mode, which requires some tests to be marked XFAIL.
The added documentation has more details.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315234 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-09 19:25:17 +00:00