Marshall Clow
a5c3485a58
Bit Operations: P0556, P0553 and P1355. Reviewed as: https://reviews.llvm.org/D51262
...
llvm-svn: 364862
2019-07-01 23:00:32 +00:00
Eric Fiselier
d1523f7a8c
Ensure bitset's string constructor doesn't poison the overload set.
...
llvm-svn: 364842
2019-07-01 19:59:34 +00:00
Marshall Clow
24edf8ef4b
Implement P0646R1: Erase-Like Algorithms Should Return size_type. Reviewed as https://reviews.llvm.org/D58332 , and then updated because I rewrote a couple of those routines to eliminate some UB. Thanks to Zoe for tghe patch.
...
llvm-svn: 364840
2019-07-01 19:22:00 +00:00
Marshall Clow
3c125fe821
Implement LWG2221: 'Formatted output for nullptr_t' Reviewed as: https://reviews.llvm.org/D63053
...
llvm-svn: 364802
2019-07-01 16:20:25 +00:00
Billy Robert O'Neal III
0384a78054
[libcxx] [test] Add void cast to result of compare_exchange_weak to suppress [[nodiscard]].
...
llvm-svn: 364732
2019-07-01 08:09:02 +00:00
Marshall Clow
954014a0fa
Add a missing '__uncvref_t' to the SFINAE constraints for optional's assignment operator. Fixes PR38638. Thanks to Jonathan Wakely for the report
...
llvm-svn: 364574
2019-06-27 18:40:55 +00:00
Marshall Clow
7d8274d54d
Followup to revision 364545: Turns out that clang issues different errors for C++11 vs c++2a, so I tweaked the 'expected-error' bits that I added to match either of them.
...
llvm-svn: 364554
2019-06-27 15:37:31 +00:00
Marshall Clow
9318430237
Provide hashers for string_view only if they are using the default char_traits. Seen on SO: test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp
...
llvm-svn: 364545
2019-06-27 14:18:32 +00:00
Richard Smith
4bd4acc969
Fix test failures due to modified wording in Clang diagnostics.
...
llvm-svn: 364241
2019-06-24 22:01:03 +00:00
Richard Smith
66e6e37447
Fix test failures when using a custom ABI namespace.
...
llvm-svn: 364239
2019-06-24 21:46:05 +00:00
Eric Fiselier
fb2bd4a939
Use C++11 implementation of unique_ptr in C++03.
...
llvm-svn: 364161
2019-06-23 20:47:21 +00:00
Marshall Clow
410b650e67
Implement P0340R3: Make 'underlying_type' SFINAE-friendly. Reviewed as https://reviews.llvm.org/D63574
...
llvm-svn: 364094
2019-06-21 18:57:06 +00:00
Eric Fiselier
e652f8097b
Use rvalue references throughout the is_constructible traits.
...
llvm-svn: 364065
2019-06-21 15:35:33 +00:00
Eric Fiselier
000f25a37e
Make move and forward work in C++03.
...
These functions are key to allowing the use of rvalues and variadics
in C++03 mode. Everything works the same as in C++11, except for one
tangentially related case:
struct T {
T(T &&) = default;
};
In C++11, T has a deleted copy constructor. But in C++03 Clang gives
it both a move and a copy constructor. This seems reasonable enough
given the extensions it's using.
The other changes in this patch were the minimal set required
to keep the tests passing after the move/forward change. Most notably
the removal of the `__rv<unique_ptr>` hack that was present
in an attempt to make unique_ptr move only without language support.
llvm-svn: 364063
2019-06-21 15:20:55 +00:00
Eric Fiselier
f044ebeb8d
Enable aligned_union in C++03
...
llvm-svn: 364058
2019-06-21 14:45:08 +00:00
Eric Fiselier
b6a9afa823
Get is_convertible tests passing in C++03 (except the fallback).
...
llvm-svn: 364057
2019-06-21 14:43:15 +00:00
Eric Fiselier
87cf92d9cb
Make rvalue metaprogramming traits work in C++03.
...
The next step is to get move and forward working in C++03.
llvm-svn: 364053
2019-06-21 14:31:34 +00:00
Zhihao Yuan
4513f0f022
[libc++] Recommit r363692 to implement P0608R3
...
Re-apply the change which was reverted in r363764 as-is after
breakages being resolved. Thanks Eric Fiselier for working
hard on this.
See also: https://bugs.llvm.org/show_bug.cgi?id=42330
Differential Revision: https://reviews.llvm.org/D44865
llvm-svn: 363993
2019-06-20 22:09:40 +00:00
Louis Dionne
f2f7d72f00
[libc++] Take 2: Implement CTAD for map and multimap
...
This is a re-application of r362986 (which was reverted in r363688) with fixes
for the issue that caused it to be reverted.
Thanks to Arthur O'Dwyer for the patch.
Differential Revision: https://reviews.llvm.org/D58587
llvm-svn: 363968
2019-06-20 19:32:00 +00:00
Xing Xue
ab4bcd844a
AIX system headers need stdint.h and inttypes.h to be re-enterable
...
Summary:
AIX system headers need stdint.h and inttypes.h to be re-enterable when macro _STD_TYPES_T is defined so that limit macro definitions such as UINT32_MAX can be found. This patch attempts to allow that on AIX.
Reviewers: hubert.reinterpretcast, jasonliu, mclow.lists, EricWF
Reviewed by: hubert.reinterpretcast, mclow.lists
Subscribers: jfb, jsji, christof, cfe-commits, libcxx-commits, llvm-commits
Tags: #LLVM, #clang, #libc++
Differential Revision: https://reviews.llvm.org/D59253
llvm-svn: 363939
2019-06-20 15:36:32 +00:00
Zhihao Yuan
3f0ae625eb
[libc++] Revert r363692 which implements P0608R3
...
The change caused a large number of compiler failures in
Google's codebase. People need time to evaluate the impact.
llvm-svn: 363764
2019-06-19 07:11:08 +00:00
Marshall Clow
2184374d94
Disable the 'nextafter' portions of these tests on PPC when using 128-bit doubles because the 'nextafter' call doesn't work right. Reviewed as https://reviews.llvm.org/D62384 . Thanks to Xing Xue for the patch, and Hubert for the explanation.
...
llvm-svn: 363740
2019-06-18 21:20:02 +00:00
Marshall Clow
8dc6840f1c
Fix the floating point version of midpoint. It wasn't constexpr, among other things. Add more tests. As a drive-by, the LCD implementation had a class named '__abs' which did a 'absolute value to a common-type' conversion. Rename that to be '__ct_abs'.
...
llvm-svn: 363714
2019-06-18 18:13:54 +00:00
Zhihao Yuan
c74fc6d5f9
[libc++] Implement P0608R3 - A sane variant converting constructor
...
Summary:
Prefer user-defined conversions over narrowing conversions and conversions to bool.
References:
http://wg21.link/p0608
Reviewers: EricWF, mpark, mclow.lists
Reviewed By: mclow.lists
Subscribers: zoecarver, ldionne, libcxx-commits, cfe-commits, christof
Differential Revision: https://reviews.llvm.org/D44865
llvm-svn: 363692
2019-06-18 15:26:50 +00:00
Louis Dionne
91185b69d1
[libc++] Re-apply XFAIL to is_base_of test that was inadvertently reverted
...
llvm-svn: 363689
2019-06-18 15:01:59 +00:00
Louis Dionne
1fab01f92b
[libc++] Revert the addition of map/multimap CTAD
...
This was found to be broken on Clang trunk. This is a revert of the
following commits (the subsequent commits added XFAILs to the tests
that were missing from the original submission):
r362986: Implement deduction guides for map/multimap.
r363014: Add some XFAILs
r363097: Add more XFAILs
r363197: Add even more XFAILs
llvm-svn: 363688
2019-06-18 14:40:15 +00:00
Marshall Clow
2e550cabea
Add tests for LWG 3206. NFC
...
llvm-svn: 363589
2019-06-17 18:06:30 +00:00
Louis Dionne
0feebef501
[libcxx] Add XFAIL for facet test when back-deploying to older macOS
...
llvm-svn: 363405
2019-06-14 14:40:38 +00:00
Louis Dionne
64c1d456c1
[libc++] Add missing #include in <cwchar> tests
...
Thanks to Mikhail Maltsev for the patch.
Differential Revision: https://reviews.llvm.org/D63289
llvm-svn: 363290
2019-06-13 18:24:28 +00:00
Louis Dionne
c45f592b98
[libcxx] XFAIL set/multiset CTAD tests on Apple Clang 10
...
llvm-svn: 363209
2019-06-12 22:01:05 +00:00
Louis Dionne
782fff1bf8
[libcxx] XFAIL some CTAD tests on AppleClang 10
...
AppleClang 10 doesn't contain some changes that are required for this
test to give the right error message.
llvm-svn: 363197
2019-06-12 20:12:44 +00:00
Eric Fiselier
0e9b1d2a20
Move libc++ specific tests for std::function out of the std directory
...
llvm-svn: 363111
2019-06-11 22:59:53 +00:00
Louis Dionne
c06943b67d
[libcxx] Mark CTAD tests for set and multiset as unsupported on older Apple Clangs
...
Those fail on Green Dragon.
llvm-svn: 363107
2019-06-11 22:36:20 +00:00
Marshall Clow
903d3db593
Mark CTAD fail tests for set/multiset as XFAIL for older compilers that give different error messages
...
llvm-svn: 363099
2019-06-11 20:35:19 +00:00
Marshall Clow
1dc3c9aa8f
XFAIL a couple of tests on apple-clang-9.1, which is a compiler that I didn't know existed
...
llvm-svn: 363097
2019-06-11 20:14:07 +00:00
Louis Dionne
e20865c387
[libc++] Implement deduction guides for <set>
...
This is part of C++17's P0433.
Thanks to Arthur O'Dwyer for the patch.
Differential Revision: https://reviews.llvm.org/D58582
llvm-svn: 363090
2019-06-11 18:21:08 +00:00
Louis Dionne
776acf225b
[libcxx] Slightly improved policy for handling experimental features
...
Summary:
Following the discussion on the libcxx-dev mailing list
(http://lists.llvm.org/pipermail/libcxx-dev/2019-May/000358.html ),
this implements the new policy for handling experimental features and
their deprecation. We basically add a deprecation warning for
std::experimental::filesystem, and we remove a bunch of <experimental/*>
headers that were now empty.
Reviewers: mclow.lists, EricWF
Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits, jfb
Tags: #libc
Differential Revision: https://reviews.llvm.org/D62428
llvm-svn: 363072
2019-06-11 14:48:40 +00:00
Marshall Clow
2efd2957ef
Add a test for is_base_of and incomplete types. Because this trait uses a compiler intrinsic which was broken in many clangs, have lots of XFAILs.
...
llvm-svn: 363029
2019-06-11 03:38:29 +00:00
Marshall Clow
d40807c6bb
XFAIL a couple of CTAD tests on clang-6; it gives different error messages than clang 7/8/9
...
llvm-svn: 363014
2019-06-11 00:23:50 +00:00
Marshall Clow
edfe8525de
Implement deduction guides for map/multimap. Reviewed as https://reviews.llvm.org/D58587 . Thanks to Quuxplusone for the submission.
...
llvm-svn: 362986
2019-06-10 21:28:23 +00:00
Zhihao Yuan
6bc4a7685e
[libc++] Fix leading zeros in std::to_chars
...
Summary:
It is a bugfix proposal for https://bugs.llvm.org/show_bug.cgi?id=42166 .
`std::to_chars` appends leading zeros if input 64-bit value has 9, 10 or 11 digits.
According to documentation `std::to_chars` must not append leading zeros:
https://en.cppreference.com/w/cpp/utility/to_chars
Changeset should not affect `std::to_chars` performance:
http://quick-bench.com/CEpRs14xxA9WLvkXFtaJ3TWOVAg
Unit test that `std::from_chars` supports compatibility for both `std::to_chars` outputs (previous and fixed one) already exists:
1f60111b59/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp (L63)
Reviewers: lichray, mclow.lists, ldionne, EricWF
Reviewed By: lichray, mclow.lists
Subscribers: zoecarver, christof, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D63047
llvm-svn: 362967
2019-06-10 17:11:46 +00:00
Eric Fiselier
cdff380681
Fix some incorrect std::function tests
...
llvm-svn: 362861
2019-06-08 00:45:45 +00:00
Louis Dionne
8f500a6f9c
[libcxx][test] Include test_workarounds.h where needed
...
Some tests require `TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT`, but they
did not include the header that defines that macro.
Thanks to Michael Park for the patch.
Differential Revision: https://reviews.llvm.org/D62920
llvm-svn: 362660
2019-06-05 21:54:34 +00:00
Louis Dionne
c3c23b27a4
[libcxx] Add test to check min/max requirement to regular expression
...
This commit adds tests that repeated characters in regular expressions
are within numeric limits, and that a <= b in a regex like `x{a,b}`.
Thanks to Andrey Maksimov for the patch.
Differential Revision: https://reviews.llvm.org/D62816
llvm-svn: 362525
2019-06-04 16:47:18 +00:00
Marshall Clow
605d62e9de
No longer reject inputs when using a locale that has grouping information _and_ the input has no grouping characters at all. We continue to reject cases when the input has grouping characters in the wrong place. Fixes PR#28704
...
llvm-svn: 362508
2019-06-04 15:18:46 +00:00
Marshall Clow
7fc6a55688
Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended.
...
llvm-svn: 362252
2019-05-31 18:35:30 +00:00
Louis Dionne
ee319034ab
[libcxx] Add regex test cases from PR40904
...
llvm-svn: 362115
2019-05-30 16:53:05 +00:00
Marshall Clow
6b03a1b423
Add additional constraints on midpoint(pointer, pointer). Fixes PR#42037.
...
llvm-svn: 361970
2019-05-29 15:17:55 +00:00
Marshall Clow
41d5fdfa91
Fix test that used raw string literals. Doesn't work in C++03
...
llvm-svn: 361894
2019-05-28 23:13:55 +00:00
Marshall Clow
1efbe67414
Fix an incorrect 'Throws' in the regex code. Add a test for the new behavior. Reviewed as https://reviews.llvm.org/D61828 . Thanks to Mark for the catch and the fix.
...
llvm-svn: 361887
2019-05-28 22:42:32 +00:00