Commit Graph

2907 Commits

Author SHA1 Message Date
Zhihao Yuan
dc38e97601 [libc++][C++17] Elementary string conversions for integral types
Summary:
Major QoI considerations:

- The facility is backported to C++14, same as libstdc++.
- Efforts have been made to minimize the header dependencies.
- The design is friendly to the uses of MSVC intrinsics (`__emulu`, `_umul128`, `_BitScanForward`, `_BitScanForward64`) but not implemented; future contributions are welcome.

Thanks to Milo Yip for contributing the implementation of `__u64toa` and `__u32toa`.

References:
 https://wg21.link/p0067r5
 https://wg21.link/p0682r1

Reviewers: mclow.lists, EricWF

Reviewed By: mclow.lists

Subscribers: ldionne, Quuxplusone, christof, mgorny, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338479 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 02:38:30 +00:00
Erik Pilkington
36fc737189 First half of C++17's splicing maps and sets
This commit adds a node handle type, (located in __node_handle), and adds
extract() and insert() members to all map and set types, as well as their
implementations in __tree and __hash_table.

The second half of this feature is adding merge() members, which splice nodes
in bulk from one container into another. This will be committed in a follow-up.

Differential revision: https://reviews.llvm.org/D46845

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338472 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 01:33:38 +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
Marshall Clow
4983a7a649 Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338454 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 23:29:06 +00:00
Marshall Clow
8a16d40991 import timespec and timespec_get into namespace std if we're under c++17 or later AND the underlying C library has them. Fixes PR#38220, but doesn't implement all of P0063 yet.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338419 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 19:25:00 +00:00
Marshall Clow
1bef51a0b5 Introduce a new test macro TEST_HAS_C11_FEATURES which is set when the underlying C library has C11 features. In C++17, we use those features. <__config> defines a similar macro, _LIBCPP_HAS_C11_FEATURES, but we don't want to use that in the library-independent parts of the tests, so define the new one. Also add a libc++-specific test to make sure the two stay in sync.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338411 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 18:23:57 +00:00
Tim Shen
379cbeb1a2 [libcxx] fix >> 42 UB in <experimental/simd>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338325 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 23:05:40 +00:00
Tim Shen
154f393a5c Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
...with proper guarding #ifdefs for unsupported C++11.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338318 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 22:27:38 +00:00
Tim Shen
b6244cf5af Revert "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
This reverts commit r338309.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338316 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 22:21:22 +00:00
Tim Shen
373299533a [libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.
Summary:
This patch adds a new macro _LIBCPP_HAS_NO_VECTOR_EXTENSION for detecting
whether a vector extension (\_\_attribute\_\_((vector_size(num_bytes)))) is
available.

On the top of that, this patch implements the following API:
* all constructors
* operator[]
* copy_from
* copy_to

It also defines simd_abi::native to use vector extension, if available.
In GCC and Clang, certain values with vector extension are passed by registers,
instead of memory.

Based on D41148.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits, MaskRay, lichray, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338309 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 21:23:13 +00:00
Eric Fiselier
bc3f4035c3 Add libc++fs to the test deps, and not to the target 'cxx'.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338096 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:47:46 +00:00
Eric Fiselier
0be5527dc0 Attempt to unbreak *all the bots*
The bots were failing to build the cxx_filesystem target, so the
tests were failing. Though this does lead me to wonder how it
was ever working with c++experimental.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338095 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:42:58 +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
Eric Fiselier
cff3d7b202 Correct comment about stat truncating st_mtimespec to seconds
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338000 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 03:42:25 +00:00
Eric Fiselier
6655abbc33 Workaround OS X 10.11 behavior where stat truncates st_mtimespec to seconds.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337998 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 03:28:48 +00:00
Eric Fiselier
8940394a74 Add print statements to help debugging
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337991 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 01:10:50 +00:00
Eric Fiselier
98e53227eb Work around GCC bug in constexpr function
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337976 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 22:21:47 +00:00
Eric Fiselier
0c29afae93 Remove test which shouldn't have been committed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337971 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 21:58:37 +00:00
Eric Fiselier
81872e95bf [libc++] Use __int128_t to represent file_time_type.
Summary:
The ``file_time_type`` time point is used to represent the write times for files.
Its job is to act as part of a C++ wrapper for less ideal system interfaces. The
underlying filesystem uses the ``timespec`` struct for the same purpose.

However, the initial implementation of ``file_time_type`` could not represent
either the range or resolution of ``timespec``, making it unsuitable. Fixing
this requires an implementation which uses more than 64 bits to store the
time point.

I primarily considered two solutions: Using ``__int128_t`` and using a
arithmetic emulation of ``timespec``. Each has its pros and cons, and both
come with more than one complication.

However, after a lot of consideration, I decided on using `__int128_t`. This patch implements that change.

Please see the [FileTimeType Design Document](http://libcxx.llvm.org/docs/DesignDocs/FileTimeType.html) for more information.

Reviewers: mclow.lists, ldionne, joerg, arthur.j.odwyer, EricWF

Reviewed By: EricWF

Subscribers: christof, K-ballo, cfe-commits, BillyONeal

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337960 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 20:51:49 +00:00
Eric Fiselier
e428b57e79 Fix diagnostic test to tolerate Clang diagnosing it as well.
Tuple has tests that ensure we diagnose non-lifetime extended
reference bindings inside tuples constructors. As of yesterday,
Clang now does this for us.

Adjust the test to tolerate the new diagnostics, while still
testing that we emit diagnostics of our own. Maybe after this
version of Clang has been adopted by most users we should
remove our diagnostics; but for now more error detection is
better!

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337905 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 11:16:39 +00:00
Eric Fiselier
8410c8170a Fix bugs in create_directory implementation.
Libc++ was incorrectly reporting an error when the target of create_directory
already exists, but was not a directory. This behavior is not specified
in the most recent standard, which says no error should be reported.

Additionally, libc++ failed to report an error when the attribute directory
path didn't exist or didn't name a directory. This has been fixed as well.

Although it's not clear if we should call status or symlink_status on the
attribute directory. This patch chooses to still call status.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337888 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 04:46:32 +00:00
Eric Fiselier
bb00305f46 Fix missing includes in format_string.hpp helper
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337886 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 04:21:59 +00:00
Marshall Clow
d3e32d2c53 New test support for comparisons. Reviewed as https://reviews.llvm.org/D49773
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337885 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 04:21:21 +00:00
Eric Fiselier
2493db4b26 Make <experimental/filesystem> explicitly require C++11.
Previously the <experimental/filesystem> didn't guard its
contents in any dialect. However, the implementation implicitly
requires at least C++11, and the tests have always been marked
unsupported in C++03. This patch puts a header guard around the
contents to avoid exposing them before C++11.

Additionally, it replaces all of the usages of _NOEXCEPT or
_LIBCPP_CONSTEXPR with the keyword directly, since we can
expect the compiler to implement those by now.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337884 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 03:41:31 +00:00
Alexander Richardson
2be41bb90b Stop wrapping __has_include in another macro
Summary:
This is not guaranteed to work since the characters after '__has_include('
have special lexing rules that can't possibly be applied when
__has_include is generated by a macro. It also breaks the crash reproducers
generated by -frewrite-includes (see https://llvm.org/pr37990).

Reviewers: EricWF, rsmith, mclow.lists
Reviewed By: mclow.lists
Differential Revision: https://reviews.llvm.org/D49067

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337824 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 12:40:56 +00:00
Marshall Clow
dfd0874465 Disable 'suggest braces' warnings for std::array in tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337808 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 03:41:36 +00:00
Marshall Clow
fbd3e84fa1 Implement <span>. Reviewed as https://reviews.llvm.org/D49338
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337804 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 03:01:02 +00:00
Eric Fiselier
f581ed2017 Fix accidentally removed test.
When adding the new tests for the filesystem_error::what method,
I incorrectly removed a test case and replaced it with something else.

This patch restores that test case

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337764 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 22:39:56 +00:00
Eric Fiselier
ba01d96cb5 Fix use of C++14 syntax in C++11 filesystem tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337666 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 03:41:46 +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
1061b65e6e fix test failures with older clang versions
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337658 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-22 20:50:16 +00:00
Eric Fiselier
70c866bfc1 Implement a better copy_file.
This patch improves both the performance, and the safety of the
copy_file implementation.

The performance improvements are achieved by using sendfile on
Linux and copyfile on OS X when available.

The TOCTOU hardening is achieved by opening the source and
destination files and then using fstat to check their attributes to
see if we can copy them.

Unfortunately for the destination file, there is no way to open
it without accidentally creating it, so we first have to use
stat to determine if it exists, and if we should copy to it.
Then, once we're sure we should try to copy, we open the dest
file and ensure it names the same entity we previously stat'ed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337649 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-22 02:00:53 +00:00
Eric Fiselier
77c9cf44e3 Fix two test failures in <experimental/filesystem>
First, <experimental/filesystem> didn't correctly guard
against min/max macros. This adds the proper push/pop macro guards.

Second, an internal time helper had been renamed but the test for
it hadn't been updated. This patch updates those tests.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337520 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20 01:51:48 +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
9765ed0367 Fix a couple of 'unused variable' warnings in a vector test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337016 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13 16:26:16 +00:00
Marshall Clow
fbb1e6166a Turns out that wide literals U"xxx" and u"xxx" are c++11 and later.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336880 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12 02:55:01 +00:00
Marshall Clow
88709a3f4e Same reversed ifdef happened twice. Test fix only, NFC to the library.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336856 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 21:22:13 +00:00
Marshall Clow
839b1a6ebd Fix a test #ifdef that was reversed. NFC to the library.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336855 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 21:20:42 +00:00
Casey Carter
8df0521f96 [test] two small cleanups:
* Remove unused type from is_assignable.pass.cpp

* Don't specialize `common_type<::X<float>>` in common_type.pass.cpp, which violates the requirements of [meta.trans.other]/5

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336618 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09 23:45:09 +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
Stephan T. Lavavej
9165f9d181 [libcxx] [test] Strip trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334676 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-14 00:12:20 +00:00
Stephan T. Lavavej
9c0cb24c23 [libcxx] [test] Update msvc_stdlib_force_include.hpp.
MSVC's STL removed _SCL_SECURE_NO_WARNINGS.

MSVC's STL implemented feature-test macros.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334675 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-14 00:12:14 +00:00
Volodymyr Sapsai
c19d47a81b Mark the test using <experimental/memory_resource> to require c++experimental.
When built against the old libc++ version the test was causing linker error

Undefined symbols for architecture x86_64:
  "std::experimental::fundamentals_v1::pmr::new_delete_resource()", referenced from:
      void test_evil<WidgetV0, WidgetV0>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV0, WidgetV1>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV0, WidgetV2>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV0, WidgetV3>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV1, WidgetV0>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV1, WidgetV1>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV1, WidgetV2>() in construct_piecewise_pair_evil.pass.cpp.o
      ...



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334431 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-11 19:42:27 +00:00
Eric Fiselier
d54a86893f Fix test failures after r334053.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334056 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-06 00:13:49 +00:00
Eric Fiselier
301518c94e Fix PR37694 - std::vector doesn't correctly move construct allocators.
C++2a[container.requirements.general]p8 states that when move constructing
a container, the allocator is move constructed. Vector previously copy
constructed these allocators. This patch fixes that bug.

Additionally it cleans up some unnecessary allocator conversions
when copy constructing containers. Libc++ uses
__internal_allocator_traits::select_on_copy_construction to select
the correct allocator during copy construction, but it unnecessarily
converted the resulting allocator to the user specified allocator
type and back. After this patch list and forward_list no longer
do that.

Technically we're supposed to be using allocator_traits<allocator_type>::select_on_copy_construction,
but that should seemingly be addressed as a separate patch, if at all.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334053 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-05 22:32:52 +00:00
JF Bastien
c8846cc964 Filesystem tests: un-confuse write time
Summary:
The filesystem test was confused about access versus write / modification time. The spec says:

  file_time_type last_write_time(const path& p, error_code& ec) noexcept;
  Returns: The time of last data modification of p, determined as if by the value of the POSIX stat structure member st_mtime obtained as if by POSIX stat(). The signature with argument ec returns file_time_type::min() if an error occurs.

The test was looking at st_atime, not st_mtime, when comparing the result from last_write_time. That was probably due to using a pair instead of naming things nicely or using types. I opted to rename things so it's clearer.

This used to cause test bot failures.

<rdar://problem/40648859>

Reviewers: EricWF, mclow.lists, aemerson

Subscribers: christof, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333723 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-01 04:59:48 +00:00
JF Bastien
e4063adf19 Mark deduction guide tests as failing on apple-clang-9
As discussed here: http://lists.llvm.org/pipermail/cfe-dev/2018-May/058116.html
The tests fail on clang-5, as well as apple-clang-9. Mark them as such.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333479 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-29 23:28:04 +00:00
Marshall Clow
1e6ac5e8f4 Fix embarrasing typo in uncaught_exceptions. Update tests to really test this. Thanks to Peter Klotz for calling my attention to this.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333467 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-29 22:25:42 +00:00
Eric Fiselier
40a29e79c2 LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()"
Patch from Arthur O'Dwyer.

In the TS, `uses_allocator` construction for `pair` tried to use an allocator
type of `memory_resource*`, which is incorrect because `memory_resource*` is
not an allocator type. LWG 2969 fixed it to use `polymorphic_allocator` as the
allocator type instead.

https://wg21.link/lwg2969

(D47090 included this in `<memory_resource>`; at Eric's request, I've split
this out into its own patch applied to the existing
`<experimental/memory_resource>` instead.)

Reviewed as https://reviews.llvm.org/D47109


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333384 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-29 00:08:47 +00:00
Marshall Clow
d1e11a1a6f Fix up the final bits of breakage due to clang v5 generating bad implicit template deduction guides - specifically for copy-ctors
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333381 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-28 19:20:21 +00:00