Commit Graph

630 Commits

Author SHA1 Message Date
Marshall Clow a4ce437104 Actually mark LWG#2953, don't just say you've done so in r342070
llvm-svn: 342071
2018-09-12 18:53:02 +00:00
Marshall Clow 71f7d7b1c7 mark LWG#2953 as complete. No code changes required, but added a couple of extra tests.
llvm-svn: 342070
2018-09-12 18:51:12 +00:00
Marshall Clow ebff3123a2 Implement LWG #3017. list splice functions should use addressof
llvm-svn: 342057
2018-09-12 14:46:17 +00:00
Marshall Clow 05ff3d3bf7 Mark P0556 as 'in progress'
llvm-svn: 340752
2018-08-27 16:07:01 +00:00
Marshall Clow 7986a5bdf8 Mark LWG#2260 as complete. We already did the right thing, so I just added tests to ensure that we continue to DTRT.
llvm-svn: 338936
2018-08-03 23:28:48 +00:00
Marshall Clow 07d8ac0ab5 Implement P1023: constexpr comparison operators for std::array
llvm-svn: 338668
2018-08-02 02:11:06 +00:00
Marshall Clow 1f9e03f04d Final bit of P0063 - make sure that aligned_alloc is available when the underlying C library supports it
llvm-svn: 338457
2018-07-31 23:39:12 +00:00
Eric Fiselier 5090559bd4 Correctly mark the Filesystem status as complete.
llvm-svn: 338094
2018-07-27 03:16:02 +00:00
Eric Fiselier 998a5c8831 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.

llvm-svn: 338093
2018-07-27 03:07:09 +00:00
Marshall Clow 8f7da2458e Mark <span> as complete
llvm-svn: 337879
2018-07-25 01:55:25 +00:00
Eric Fiselier 9158bfd32e 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.

llvm-svn: 337664
2018-07-23 02:00:52 +00:00
Eric Fiselier c16998649e [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

llvm-svn: 337516
2018-07-20 01:22:32 +00:00
Marshall Clow d8f5b2d612 Fix HTML blunder
llvm-svn: 336381
2018-07-05 17:44:12 +00:00
Marshall Clow 76b26852b6 Implement LWG 2946, 3075 and 3076. Reviewed as https://reviews.llvm.org/D48616
llvm-svn: 336132
2018-07-02 18:41:15 +00:00
Marshall Clow b6b7a3bb78 Remove P0771, which was not passed in Rapperswil
llvm-svn: 334894
2018-06-16 18:03:29 +00:00
Marshall Clow e044d1e504 Update the to-do list with motions from Rapperswil.
llvm-svn: 334467
2018-06-12 02:45:30 +00:00
Marshall Clow 50eae5a3e5 Mark more bits of P0433 as complete.
llvm-svn: 333058
2018-05-23 03:22:59 +00:00
Marshall Clow d23dc0f01e More notes on Rapperswil issues
llvm-svn: 332000
2018-05-10 17:07:38 +00:00
Marshall Clow 23b242f910 Status updates for Rapperswil
llvm-svn: 331661
2018-05-07 18:59:04 +00:00
Marshall Clow b1f2396879 Update for Rapperswil
llvm-svn: 331638
2018-05-07 14:21:52 +00:00
Marshall Clow 1b25a3994e Mark <span> as "In progress"
llvm-svn: 329375
2018-04-06 04:43:27 +00:00
Marshall Clow 082229eb0f Implement P0754R2: The <version> header.
llvm-svn: 329075
2018-04-03 15:48:24 +00:00
Eric Fiselier d491a6960a Implement P0430R2 - File system library on non-POSIX systems.
This patch implements P0430R2, who's largest change is adding the path::format
enumeration for supporting path format conversions in path constructors.

However, since libc++'s filesystem only really supports POSIX like systems,
there are no real changes needed. This patch simply adds the format enum
and then ignores it when it's passed to constructors.

llvm-svn: 329031
2018-04-02 23:35:24 +00:00
Eric Fiselier d7fae181c3 Implement filesystem NB comments, relative paths, and related issues.
This is a fairly large patch that implements all of the filesystem NB comments
and the relative paths changes (ex. adding weakly_canonical). These issues
and papers are all interrelated so their implementation couldn't be split up
nicely.

This patch upgrades <experimental/filesystem> to match the C++17 spec and not
the published experimental TS spec. Some of the changes in this patch are both
API and ABI breaking, however libc++ makes no guarantee about stability for
experimental implementations.

The major changes in this patch are:

* Implement NB comments for filesystem (P0492R2), including:
  * Implement `perm_options` enum as part of NB comments, and update the
    `permissions` function to match.
  * Implement changes to `remove_filename` and `replace_filename`
  * Implement changes to `path::stem()` and `path::extension()` which support
    splitting examples like `.profile`.
  * Change path iteration to return an empty path instead of '.' for trailing
    separators.
  * Change `operator/=` to handle absolute paths on the RHS.
  * Change `absolute` to no longer accept a current path argument.

* Implement relative paths according to NB comments (P0219r1)

* Combine `path.cpp` and `operations.cpp` since some path functions require
  access to the operations internals, and some fs operations require access
  to the path parser.

llvm-svn: 329028
2018-04-02 23:03:41 +00:00
Marshall Clow 4a6f3c4710 Implement LWG3034: P0767R1 breaks previously-standard-layout types
llvm-svn: 328064
2018-03-21 00:36:05 +00:00
Marshall Clow c8faf3a93c Updated C++2a status with changes from Jacksonville WG21 meeting
llvm-svn: 327806
2018-03-18 19:29:21 +00:00
Marshall Clow 6d1aec1260 Implement LWG#2518 - Non-member swap for propagate_const should call member swap
llvm-svn: 327005
2018-03-08 15:01:50 +00:00
Marshall Clow 042f07eed8 Implement P0767R1 - Deprecate POD
llvm-svn: 326801
2018-03-06 15:01:19 +00:00
Marshall Clow aadaabe649 Added P0805 to the list of ready bits
llvm-svn: 326485
2018-03-01 21:16:07 +00:00
Marshall Clow 5012793e05 Implement LWG 2835 - fix <tgmath.h>
llvm-svn: 324923
2018-02-12 19:13:24 +00:00
Marshall Clow c0db07299e Implement LWG#2908 - The less-than operator for shared pointers could do more, and mark 2878 as complete as well (we already do that)
llvm-svn: 324911
2018-02-12 17:26:40 +00:00
Eric Fiselier 6808a59244 Mark two issues as complete
llvm-svn: 324852
2018-02-11 21:57:25 +00:00
Marshall Clow 2583976e81 Update the status of removed components
llvm-svn: 324609
2018-02-08 14:51:22 +00:00
Marshall Clow 6d9f750dec Implement deduction guide for basic_string as described in P0433
llvm-svn: 324569
2018-02-08 06:34:03 +00:00
Marshall Clow 1d4546c0ad Comment on 'Review' issues
llvm-svn: 324503
2018-02-07 19:24:37 +00:00
Marshall Clow f9ab87e9cc Mark P0777 as complete
llvm-svn: 324399
2018-02-06 21:00:58 +00:00
Marshall Clow cefa05d39f No, really this time mark 3034 as 'Patch Ready'
llvm-svn: 324312
2018-02-06 03:24:21 +00:00
Marshall Clow 4d170c801b Mark issue 3034 as 'Patch Ready'
llvm-svn: 324310
2018-02-06 03:23:16 +00:00
Marshall Clow 0fc039df1e More patches ready
llvm-svn: 324307
2018-02-06 01:59:28 +00:00
Marshall Clow 50dd98cb2b Add issues in 'Review'
llvm-svn: 324292
2018-02-05 23:50:49 +00:00
Eric Fiselier 4f0c85310d Mark LWG 3014 as complete. No code changes needed
llvm-svn: 324193
2018-02-04 07:37:09 +00:00
Eric Fiselier e3690ba586 Implement LWG 3014 - Fix more noexcept issues in filesystem.
This patch removes the noexcept declaration from filesystem
operations which require creating temporary paths or
creating a directory iterator. Either of these operations
can throw.

llvm-svn: 324192
2018-02-04 07:35:36 +00:00
Eric Fiselier 309f8b1168 Mark LWG 3013 as already complete. See r316941
llvm-svn: 324191
2018-02-04 07:29:53 +00:00
Eric Fiselier be71d336bd Implement LWG2989: path's streaming operators allow everything under the sun.
Because path can be constructed from a ton of different types, including string
and wide strings, this caused it's streaming operators to suck up all sorts
of silly types via silly conversions. For example:

using namespace std::experimental::filesystem::v1;
std::wstring w(L"wide");
std::cout << w; // converts to path.

This patch tentatively adopts the resolution to LWG2989 and fixes the issue
by making the streaming operators friends of path.

llvm-svn: 324189
2018-02-04 03:10:53 +00:00
Eric Fiselier 21f2004991 Mark issue 2851 as complete
llvm-svn: 324188
2018-02-04 02:45:33 +00:00
Eric Fiselier 0f8c8f59df Address LWG 2849 and fix missing failure condition in copy_file.
Previously copy_file didn't handle the case where the input and
output were the same file.

llvm-svn: 324187
2018-02-04 02:43:32 +00:00
Marshall Clow 0551d83ed5 Implement LWG2870: Default value of parameter theta of polar should be dependent
llvm-svn: 323918
2018-01-31 21:42:39 +00:00
Marshall Clow 9eb338c42e Add LWG3051
llvm-svn: 323822
2018-01-30 21:49:17 +00:00
Marshall Clow d0eb3092ac First cut at issue statuses for JAX
llvm-svn: 323720
2018-01-30 00:48:39 +00:00
Marshall Clow 6f73cf45df Minor updated to the main libcxx page; add a link to the deprecation page
llvm-svn: 323694
2018-01-29 21:28:46 +00:00
Marshall Clow 8abbc96c18 Mark 2903 as complete; we already do this
llvm-svn: 323479
2018-01-25 22:33:17 +00:00
Marshall Clow e34f5ffe4b Implement LWG2783: stack::emplace() and queue::emplace() should return decltype(auto)
llvm-svn: 323385
2018-01-24 22:42:25 +00:00
Marshall Clow d161ac9ea6 Update cxx2a status
llvm-svn: 323160
2018-01-22 23:17:20 +00:00
Marshall Clow 49c7643c39 First part of P0202: Adding constexpr modifiers to functions in <algorithm> and <utility>. This commit is all the is_XXX algorithms.
llvm-svn: 322489
2018-01-15 16:16:32 +00:00
Marshall Clow 86de37aee6 Document upcoming TS feature removal
llvm-svn: 322011
2018-01-08 17:43:46 +00:00
Marshall Clow 12e17b19ba Mark LWG2824 as complete. We already did it, but I added a test to be sure
llvm-svn: 321689
2018-01-03 04:37:30 +00:00
Marshall Clow bae5d279ed Mark issue #2866 as "nothing to do"
llvm-svn: 321687
2018-01-03 03:43:32 +00:00
Marshall Clow dd74d83f84 Implement p0258r2: has_unique_object_representations
llvm-svn: 321685
2018-01-03 02:32:28 +00:00
Marshall Clow 28f1dfcbfe A couple more inlined variables that I missed the first time
llvm-svn: 321661
2018-01-02 18:41:01 +00:00
Marshall Clow 40a01d5314 Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).
llvm-svn: 321658
2018-01-02 17:17:01 +00:00
Marshall Clow c78e12eaf8 Add issue 2587, which was missed
llvm-svn: 319734
2017-12-05 03:51:16 +00:00
Marshall Clow 5dd9220974 Implement more of P0600: '[[nodiscard]] in the library' for C++2a
llvm-svn: 319710
2017-12-04 23:03:42 +00:00
Marshall Clow 800259c98d Implement P0457R2: 'String Prefix and Suffix Checking' for c++2a
llvm-svn: 319687
2017-12-04 20:11:38 +00:00
Marshall Clow d42db7e083 Implement LWG#2921 and LWG#2976 - removing allocator support from packaged_task.
llvm-svn: 319080
2017-11-27 19:43:28 +00:00
Marshall Clow 48f3653999 Implement LWG#2948: unique_ptr does not define operator<< for stream output
llvm-svn: 319038
2017-11-27 15:51:36 +00:00
Marshall Clow 2365c7814a Update C++2a status and add Glen to CREDITS.TXT. Reviewed as https://reviews.llvm.org/D40379
llvm-svn: 318919
2017-11-23 14:50:56 +00:00
Marshall Clow 9180eb1f4a Implement p0137r1 - std::launder. Reviewed as https://reviews.llvm.org/D40144
llvm-svn: 318864
2017-11-22 19:49:03 +00:00
Marshall Clow 12de6e9c11 Implement LWG2950: std::byte operations are misspecified
llvm-svn: 318125
2017-11-14 01:14:53 +00:00
Marshall Clow ffcfd923d7 Implement LWG2952: iterator_traits should work for pointers to cv T
llvm-svn: 318119
2017-11-14 00:03:10 +00:00
Marshall Clow 843ec14af4 Put the status in the wrong column
llvm-svn: 318012
2017-11-13 04:15:39 +00:00
Marshall Clow fbb0a5aa3f Implement P0550R2: Transformation Trait remove_cvref
llvm-svn: 318011
2017-11-13 03:59:22 +00:00
Marshall Clow 199216376a Two more papers from Albuquerque
llvm-svn: 318000
2017-11-12 18:52:16 +00:00
Marshall Clow 952d249987 Updated C++2a status page with new features/defects approved in Albuquerque.
llvm-svn: 317996
2017-11-12 18:48:42 +00:00
Marshall Clow c83386cad8 Mark Endian as 'in progress'
llvm-svn: 317209
2017-11-02 14:53:08 +00:00
Marshall Clow 3293ddb7ad More statuses, a new patch, too
llvm-svn: 317074
2017-11-01 04:03:35 +00:00
Marshall Clow 336c30e299 Fix broken links; update more issues.
llvm-svn: 316970
2017-10-31 00:19:47 +00:00
Marshall Clow ccbb496b56 Initial triage
llvm-svn: 316874
2017-10-29 21:57:58 +00:00
Marshall Clow 4a9ee9caaa Update status of 2950
llvm-svn: 316873
2017-10-29 21:43:30 +00:00
Marshall Clow 4e18fe9ac8 Issues to be voted on in ABQ
llvm-svn: 316867
2017-10-29 19:02:00 +00:00
Stephan T. Lavavej 6f297ba8a9 [libcxx] [www] Change an absolute link to cxx1z_status.html to be relative.
Fixes D37318.

llvm-svn: 312263
2017-08-31 17:59:51 +00:00
Stephan T. Lavavej 9c88eeb68d [libcxx] [www] Strip trailing whitespace.
Fixes D37318.

llvm-svn: 312262
2017-08-31 17:59:48 +00:00
Stephan T. Lavavej 98fa5d4a97 [libcxx] [www] Fix broken link for LLVM Bugzilla.
Fixes D37318.

llvm-svn: 312261
2017-08-31 17:59:46 +00:00
Stephan T. Lavavej 69c2e1336f [libcxx] [www] Manually change http links to https.
Fixes D37318.

llvm-svn: 312260
2017-08-31 17:59:42 +00:00
Stephan T. Lavavej 907c1ab603 [libcxx] [www] Semi-manually change http://www.open-std.org and http://isocpp.org papers to https://wg21.link .
Fixes D37318.

llvm-svn: 312259
2017-08-31 17:59:39 +00:00
Stephan T. Lavavej 1dc1fa2347 [libcxx] [www] Change http://cplusplus.github.io/LWG/lwg-defects.html# to https://wg21.link/lwg .
Fixes D37318.

llvm-svn: 312258
2017-08-31 17:59:36 +00:00
Stephan T. Lavavej 2956ea46cd [libcxx] [www] Change http://wg21.link to https://wg21.link .
Fixes D37318.

llvm-svn: 312257
2017-08-31 17:59:33 +00:00
Eric Fiselier 6301546b3d Mark LWG 2942 as complete
llvm-svn: 309528
2017-07-30 22:28:08 +00:00
Eric Fiselier 1190335f9d Mark LWG 2961 as complete
llvm-svn: 309527
2017-07-30 22:16:30 +00:00
Marshall Clow 88c893cc33 Implement P0739R0: 'Some improvements to class template argument deduction integration into the standard library' This is an API change (not ABI change) due to a late change in the c++17 standard
llvm-svn: 309296
2017-07-27 17:44:03 +00:00
Marshall Clow 5820ae49ab Update libc++ status pages with results of the Toronto Meeting - and for C++2a
llvm-svn: 308153
2017-07-16 23:59:23 +00:00
Marshall Clow d994e3f35d Update issues moved in Toronto
llvm-svn: 308097
2017-07-15 15:22:21 +00:00
Eric Fiselier 459877388b Implement LWG 2937 - equivalent("dne", "exists") is not an error
This patch speculatively implements the PR for LWG 2937, which fixes
two issues with equivalent.

(1) It makes equivalent("dne", "exists") an error. Previously only
    equivalent("dne", "dne") was an error and the former case was not (it returned false).
    Now equivalent reports an error when either input doesn't exist.

(2) It makes equivalent(p1, p2) well-formed when `is_other(p1) && is_other(p2)`.
    Previously this was an error, but there is seemingly no reason why it should be on POSIX system.

llvm-svn: 307117
2017-07-05 03:37:05 +00:00
Marshall Clow 797bcb40e3 Updated notest on 2974
llvm-svn: 306581
2017-06-28 18:19:34 +00:00
Marshall Clow 77957d19f8 Updated for the Toronto meeting
llvm-svn: 306269
2017-06-26 04:25:15 +00:00
Michael Park aeb2c881ce Mark LWG 2904 as complete.
llvm-svn: 304893
2017-06-07 10:27:17 +00:00
Marshall Clow 91a091cc00 Mark LWG#2900 as complete - we already do this, and I checked the tests in a couple days ago (r303268 & r303824)
llvm-svn: 303876
2017-05-25 16:05:54 +00:00
Eric Fiselier c81c8cbe77 Fix broken links on C++1z status page
llvm-svn: 303835
2017-05-25 04:09:07 +00:00
Marshall Clow c44a727ee4 Implement LWG#2790: Remove istreambuf_iterator::operator->. It never did anything useful.
llvm-svn: 303675
2017-05-23 18:55:32 +00:00
Marshall Clow 35f62e3228 Mark LWG#2782 as complete. No functionality change; we already do this. Just added a few more tests.
llvm-svn: 302802
2017-05-11 14:25:45 +00:00
Marshall Clow afda4a9af9 Mark LWG#2850 as complete. No functionality change; we had tests that covered it already. Just added comments to the tests. Thanks to K-ballo for the heads up.
llvm-svn: 302799
2017-05-11 13:55:20 +00:00