608 Commits

Author SHA1 Message Date
Louis Dionne
604afd7688 [libcxx] Implement P0318: unwrap_ref_decay and unwrap_reference
Summary:
This was voted into C++20 in San Diego. Note that there was a revision
D0318R2 which did include unwrap_reference_t, but we mistakingly voted
P0318R1 into the C++20 Working Draft (which does not include
unwrap_reference_t). This patch implements D0318R2, which is what
we'll end up with in the Working Draft once this mistake has been
fixed.

Reviewers: EricWF, mclow.lists

Subscribers: christof, dexonsmith, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348138 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-03 14:03:27 +00:00
Marshall Clow
7593e799d2 Implement P0966 - string::reserve should not shrink
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347789 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-28 18:18:34 +00:00
Marshall Clow
f4e307bd3c Implement P1085R2 - Should Span be Regular?. This consists entirely of deletions
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347672 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-27 16:35:41 +00:00
Zhihao Yuan
580cde08e1 [libc++] Implement P0487R1 - Fixing operator>>(basic_istream&, CharT*)
Summary:
Avoid buffer overflow by replacing the pointer interface with an array reference interface in C++2a.
Tentatively ready on Batavia2018.

 https://wg21.link/lwg2499
 https://wg21.link/p0487

Reviewers: mclow.lists, ldionne, EricWF

Reviewed By: ldionne

Subscribers: libcxx-commits, cfe-commits, christof

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347377 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-21 03:30:10 +00:00
Marshall Clow
44047a25fd Note that P0899R1 requires no work.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347344 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-20 20:38:15 +00:00
Marshall Clow
3b4ca5b4af Mark P0771 as complete; we already did this - I just added tests to be sure
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347343 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-20 20:37:07 +00:00
Marshall Clow
1595c0dd31 Mark #2184 as complete; the tests are fine. (I thought that they were wrong before)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346805 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 22:26:03 +00:00
Louis Dionne
a4e279c31f [NFC] Mark LWG3128 and LWG3132 as requiring no work
Those LWG issues were adopted in San Diego and require no work
on our side.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346799 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 21:13:10 +00:00
Marshall Clow
10180dc28f Remove duplicate entry for issue 3134
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346772 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 18:07:51 +00:00
Marshall Clow
87b4a050de Update status for issue 3122
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346771 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 18:05:10 +00:00
Louis Dionne
d9c27151e9 [NFC][libcxx] Mark P1006R1 as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346767 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 17:33:11 +00:00
Marshall Clow
98d4ace735 Implement P0972R0: <chrono> zero(), min(), and max() should be noexcept. Reviewed as https://reviews.llvm.org/D53828
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346766 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 17:22:41 +00:00
Louis Dionne
d086fccc3a [NFC][libcxx] Mark P1006 as implemented in LLVM 8.0
It was implemented in https://reviews.llvm.org/D53867

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346765 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 17:09:25 +00:00
Marshall Clow
94664a1ad8 Update to-do list with new work from WG21 meeting in San Diego
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346634 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-12 04:58:00 +00:00
Louis Dionne
3fa96b3738 [NFC] Replace C++1y and C++1z by C++14 and C++17, respectively
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345762 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-31 18:53:31 +00:00
Louis Dionne
def3a4042e [NFC] Mark "Splicing Maps and Sets" as done in LLVM 8.0
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345759 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-31 18:33:11 +00:00
Louis Dionne
831ab1b675 [libcxx] Correct link to code review for P1006
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345658 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 21:50:11 +00:00
Marshall Clow
02bbf435d8 Add link to implementation for P1006R0
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345653 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 21:27:42 +00:00
Marshall Clow
c5a77b2981 Added Phab link for P0927
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345526 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-29 19:31:35 +00:00
Marshall Clow
173057e232 Updated the issue notes.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344989 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-23 01:30:14 +00:00
Marshall Clow
dd10075b58 Added more notes to the issues.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344975 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-22 23:52:09 +00:00
Marshall Clow
6735cca767 Papers and Issues for San Diego
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343923 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-06 15:07:03 +00:00
Eric Fiselier
3cea452823 Correct docs to reference the new libc++ lists.
We recently added libcxx-dev and libcxx-commits mailing lists.
This patch updates the libc++ documentation to correctly reference
the libc++ lists instead of the old Clang ones.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342816 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-22 19:49:29 +00:00
Sylvestre Ledru
e404320723 add a quick link to libc++abi
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342625 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 07:58:43 +00:00
Sylvestre Ledru
ac2b5703bb refresh the libc++ homepage
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342624 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 07:57:31 +00:00
Volodymyr Sapsai
e59d098825 Revert "Implement LWG 2221 - No formatted output operator for nullptr."
This reverts r342566 as it causes on bots linker errors like

> Undefined symbols for architecture i386:
>   "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(std::nullptr_t)", referenced from:


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342599 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-19 23:31:34 +00:00
Marshall Clow
f06032bb0a Implement LWG 2221 - No formatted output operator for nullptr. Reviewed as https://reviews.llvm.org/D44263
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342566 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-19 18:29:57 +00:00
Marshall Clow
1755c75e7e Mark LWG#3102 as complete. No code changes, but I updated a test or two
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342103 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-13 02:23:52 +00:00
Marshall Clow
420ace6f28 Actually mark LWG#2953, don't just say you've done so in r342070
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342071 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-12 18:53:02 +00:00
Marshall Clow
c106dd615d mark LWG#2953 as complete. No code changes required, but added a couple of extra tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342070 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-12 18:51:12 +00:00
Marshall Clow
ec25143bbb Implement LWG #3017. list splice functions should use addressof
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342057 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-12 14:46:17 +00:00
Marshall Clow
e45e0640b6 Mark P0556 as 'in progress'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340752 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-27 16:07:01 +00:00
Marshall Clow
de134800ae Mark LWG#2260 as complete. We already did the right thing, so I just added tests to ensure that we continue to DTRT.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338936 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 23:28:48 +00:00
Marshall Clow
88f5d7a38b Implement P1023: constexpr comparison operators for std::array
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338668 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-02 02:11:06 +00:00
Marshall Clow
ea96e3a707 Final bit of P0063 - make sure that aligned_alloc is available when the underlying C library supports it
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338457 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 23:39:12 +00:00
Eric Fiselier
789c372456 Correctly mark the Filesystem status as complete.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338094 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:16:02 +00:00
Eric Fiselier
a0866c5fb5 Implement <filesystem>
This patch implements the <filesystem> header and uses that
to provide <experimental/filesystem>.

Unlike other standard headers, the symbols needed for <filesystem>
have not yet been placed in libc++.so. Instead they live in the
new libc++fs.a library. Users of filesystem are required to link this
library. (Also note that libc++experimental no longer contains the
definition of <experimental/filesystem>, which now requires linking libc++fs).

The reason for keeping <filesystem> out of the dylib for now is that
it's still somewhat experimental, and the possibility of requiring an
ABI breaking change is very real. In the future the symbols will likely
be moved into the dylib, or the dylib will be made to link libc++fs automagically).

Note that moving the symbols out of libc++experimental may break user builds
until they update to -lc++fs. This should be OK, because the experimental
library provides no stability guarantees. However, I plan on looking into
ways we can force libc++experimental to automagically link libc++fs.

In order to use a single implementation and set of tests for <filesystem>, it
has been placed in a special `__fs` namespace. This namespace is inline in
C++17 onward, but not before that. As such implementation is available
in C++11 onward, but no filesystem namespace is present "directly", and
as such name conflicts shouldn't occur in C++11 or C++14.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338093 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:07:09 +00:00
Marshall Clow
d2e2a0206e Mark <span> as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337879 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 01:55:25 +00:00
Eric Fiselier
0ddb77a467 Implement filesystem_error::what() and improve reporting.
This patch implements the `what()` for filesystem errors. The message
includes the 'what_arg', any paths that were specified, and the
error code message.

Additionally this patch refactors how errors are created, making it easier
to report them correctly.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337664 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 02:00:52 +00:00
Eric Fiselier
e274f439c6 [libc++] Implement Directory Entry Caching -- Sort of.
Summary:
This patch implements directory_entry caching *almost* as specified in P0317r1. However, I explicitly chose to deviate from the standard as I'll explain below.

The approach I decided to take is a fully caching one. When `refresh()` is called, the cache is populated by calls to `stat` and `lstat` as needed.
During directory iteration the cache is only populated with the `file_type` as reported by `readdir`.
The cache can be in the following states:

* `_Empty`: There is nothing in the cache (likely due to an error)
* `_IterSymlink`: Created by directory iteration when we walk onto a symlink only the symlink file type is known.
* `_IterNonSymlink`: Created by directory iteration when we walk onto a non-symlink. Both the regular file type and symlink file type are known.
* `_RefreshSymlink` and `_RefreshNonSymlink`: A full cache created by `refresh()`.  This case includes dead symlinks.
* `_RefreshSymlinkUnresolved`: A partial cache created by refresh when we fail to resolve the file pointed to by a symlink (likely due to permissions). Symlink attributes are cached, but attributes about the linked entity are not.

As mentioned, this implementation purposefully deviates from the standard. According to some readings of the specification, and the Windows filesystem implementation, the constructors and modifiers which don't pass an `error_code` must throw when the `directory_entry` points to a entity which doesn't exist. or when attribute resolution fails for another reason. 

@BillyONeal  has proposed a more reasonable set of requirements, where modifiers other than refresh ignore errors. This is the behavior libc++ currently implements, with the expectation some form of the new language will be accepted into the standard.

Some additional semantics which differ from the Windows implementation:

1. `refresh` will not throw when the entry doesn't exist. In this case we can still meet the functions specification, so we don't treat it as an error.
2. We don't clear the path name when a constructor fails via refresh (this will hopefully be changed in the standard as well).

It should be noted that libstdc++'s current implementation has the same behavior as libc++, except for point (2).

If the changes to the specification don't get accepted, we'll be able to make the changes later.

[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0317r1.html

Reviewers: mclow.lists, gromer, ldionne, aaron.ballman

Subscribers: BillyONeal, christof, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337516 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20 01:22:32 +00:00
Marshall Clow
1f655099cf Fix HTML blunder
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336381 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-05 17:44:12 +00:00
Marshall Clow
64c10d00c3 Implement LWG 2946, 3075 and 3076. Reviewed as https://reviews.llvm.org/D48616
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336132 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-02 18:41:15 +00:00
Marshall Clow
8d00e543f4 Remove P0771, which was not passed in Rapperswil
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334894 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 18:03:29 +00:00
Marshall Clow
385a6d473f Update the to-do list with motions from Rapperswil.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334467 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-12 02:45:30 +00:00
Marshall Clow
fa35e8885e Mark more bits of P0433 as complete.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333058 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-23 03:22:59 +00:00
Marshall Clow
faf8db7dfd More notes on Rapperswil issues
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@332000 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-10 17:07:38 +00:00
Marshall Clow
5d2e458b6f Status updates for Rapperswil
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@331661 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-07 18:59:04 +00:00
Marshall Clow
6a32b9d38f Update for Rapperswil
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@331638 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-07 14:21:52 +00:00
Marshall Clow
ece1de8658 Mark <span> as "In progress"
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329375 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-06 04:43:27 +00:00
Marshall Clow
0b261846c9 Implement P0754R2: The <version> header.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329075 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-03 15:48:24 +00:00