Dan Albert
01ed1e9c7b
DO NOT MERGE: Fix bug in random.
...
Test: ./run_test.py --bitness 32
Test: ./run_test.py --bitness 64
Test: ./run_test.py --bitness 64 --host
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=994957
Bug: http://b/139690488
Change-Id: I71708114d7fc8ed90c30b4d32b01d3f3aef7600b
(cherry picked from commit a1d1caa3d831030ce802ed335a9743180911d553)
2019-09-13 14:44:21 -07:00
Louis Dionne
c2ca4c16d1
DO NOT MERGE: [libc++] Move __clamp_to_integral to <cmath>, and harden against min()/max() macros
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@370900 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 87e6185621d332d2ef8695b94778663380c83bb9)
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=994957
Bug: http://b/139690488
Change-Id: Ice92a8ea6f675be069a70c5ad1003cf99b4fc474
(cherry picked from commit 82e0483c4a47233ed2f7bab545b32e5ddd474e59)
2019-09-13 14:44:21 -07:00
Louis Dionne
66ddc699d1
DO NOT MERGE: [libc++] Add __truncating_cast for safely casting float types to integers
...
This is needed anytime we need to clamp an arbitrary floating point
value to an integer type.
Thanks to Eric Fiselier for the patch.
Differential Revision: https://reviews.llvm.org/D66836
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@370891 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit c9ac8d533010d8915bcfdecab891fb451f71ce74)
(cherry picked from commit 4561f55204960c0b3bc4594089ddcf56e5655cad)
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=994957
Bug: http://b/139690488
Change-Id: Icc81b5f68f0f87b74ccd4eba5971fd1e14ef13a5
2019-09-13 14:44:16 -07:00
Dan Albert
bb8457c3f4
DO NOT MERGE: Suppress warnings in tests.
...
Test: ./run_tests.py
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=994957
Bug: http://b/139690488
Change-Id: I6ac409b692c7b949d3237a1fa824e90652e3c1c3
2019-09-13 14:38:29 -07:00
Chih-Hung Hsieh
68aaead27c
Revert "Revert "Revert "Turn off extern templates for most uses.""" am: 02ad8ad921 am: 95f770d2ed
...
am: 5cb39a8709
Change-Id: Icbb0bcac1e692ea76a2b93b8d2f95c8af863210e
2018-02-13 09:30:01 +00:00
Chih-Hung Hsieh
5cb39a8709
Revert "Revert "Revert "Turn off extern templates for most uses.""" am: 02ad8ad921
...
am: 95f770d2ed
Change-Id: I1930e4182f484fcaf1d796eace8aa47901d49e42
2018-02-13 09:21:26 +00:00
Chih-Hung Hsieh
95f770d2ed
Revert "Revert "Revert "Turn off extern templates for most uses."""
...
am: 02ad8ad921
Change-Id: I9086939bd3b7aa7e638ca0047eaf111a648a774a
2018-02-13 09:14:23 +00:00
Chih-Hung Hsieh
02ad8ad921
Revert "Revert "Revert "Turn off extern templates for most uses."""
...
This reverts commit 75746a3228 .
Bug: 72411393
Test: normal build, and build with clang 7.0 in system/core/demangle
Change-Id: I6c67b5210e131600ad9706afd2e1cbd7f7f40237
2018-02-09 13:37:40 -08:00
Dan Albert
7ce32925f1
Adapt to upstream changes. am: 80bd2e4b23 am: 48a3fead9e
...
am: 916ed50dec
Change-Id: Ifa1907af0ae872ff5c2147a2b039e15b62d23178
2018-02-09 18:54:34 +00:00
Dan Albert
3a46189864
Merge to upstream r324534. am: f835096310 am: 256d60accf
...
am: 740050ca52
Change-Id: Ib4c00d92dc30228097618d935738b337ddf545b6
2018-02-09 18:54:28 +00:00
Dan Albert
916ed50dec
Adapt to upstream changes. am: 80bd2e4b23
...
am: 48a3fead9e
Change-Id: I9ad49d63eae2127abe7f592c2a400415a89c6540
2018-02-09 18:45:13 +00:00
Dan Albert
740050ca52
Merge to upstream r324534. am: f835096310
...
am: 256d60accf
Change-Id: Iefc2c870030147c318f0aa462bbb0119ceb6531b
2018-02-09 18:45:04 +00:00
Dan Albert
48a3fead9e
Adapt to upstream changes.
...
am: 80bd2e4b23
Change-Id: I0bf1df54e4dc710de6735723e37dfb14c6b7049d
2018-02-09 18:38:10 +00:00
Dan Albert
256d60accf
Merge to upstream r324534.
...
am: f835096310
Change-Id: I1dcdaca4370f82d8f02b97a93fe79149b5af5c0f
2018-02-09 18:38:05 +00:00
Dan Albert
80bd2e4b23
Adapt to upstream changes.
...
Test: mma
Test: ./run_tests.py --bitness 64
Bug: None
Change-Id: I2f181c661253dffad5325c92c5fd4c05e741850f
2018-02-08 15:46:30 -08:00
Dan Albert
f835096310
Merge to upstream r324534.
...
Test: make checkbuild
Test: ./run_tests.py --bitness 32
Test: ./run_tests.py --bitness 64
Bug: None
Change-Id: I0913bfcee6cebafae3f1f663bb442d1ad4682006
2018-02-07 14:10:41 -08:00
Dan Albert
73660f725a
Stop using __strtonum_fallback on Android.
...
Fallback implementations are now provided by bionic when necessary,
which these may conflict with.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324534 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07 21:58:48 +00:00
Marshall Clow
088e6015b2
Fix PR#31454 - 'basic_string<T>::push_back() crashes if sizeof(T)>sizeof(long long)'. We were mishandling the small-string optimization calculations for very large 'characters'. This may be an ABI change (change the size of) strings of very large 'characters', but since they never worked, I'm not too concerned.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324531 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07 21:30:17 +00:00
Eric Fiselier
2e1fa09f68
Fix -verify static assert messages for older Clang versions
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324529 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07 21:25:25 +00:00
Eric Fiselier
6cb35ede81
[libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.
...
Summary:
This patch fixes llvm.org/PR35491 and LWG2157 (https://cplusplus.github.io/LWG/issue2157 )
The fix attempts to maintain ABI compatibility by replacing the array with a instance of `aligned_storage`.
Reviewers: mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: lichray, cfe-commits
Differential Revision: https://reviews.llvm.org/D41223
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324526 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07 21:06:13 +00:00
Marshall Clow
f003d63c40
Comment on 'Review' issues
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324503 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07 19:24:37 +00:00
Marshall Clow
31810d9c0b
Remove more of the std::experimental bits that are now in std::. All the _v type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324423 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 23:13:48 +00:00
Marshall Clow
c387931db5
Mark P0777 as complete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324399 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 21:00:58 +00:00
Marshall Clow
52f9ca28a3
Implement P0777: Treating unnecessay decay
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324398 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 20:56:55 +00:00
Nico Weber
68b20ca4d9
Fix building libc++ with the macOS 10.13 SDK with -mmacosx-version-min=10.12 or lower.
...
The 10.13 SDK always defines utimensat() (with an availability(macosx=10.13) annotation)
and unconditionally defines UTIME_OMIT, so use the compile-time availability macros
on Apple platforms instead.
For people statically linking libc++, it might make sense to also provide an opt-in
option for using __builtin_available() to dynamically check for the OS version,
but for now let's do the smallest thing needed to unbreak the build.
Based on a patch by Eric Fiselier <eric@efcs.ca >: https://reviews.llvm.org/D34249
Fixes PR33469.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324385 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 19:17:41 +00:00
Marshall Clow
f477af5fda
Fix misleading indentation; replace a couple of NULLs with nullptr. Resolves https://reviews.llvm.org/D42945 ; thanks to Bruce Mitchener for the patch.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324378 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 18:58:05 +00:00
Marshall Clow
46c8ec503e
No, really this time mark 3034 as 'Patch Ready'
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324312 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 03:24:21 +00:00
Marshall Clow
4d839cb37e
Mark issue 3034 as 'Patch Ready'
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324310 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 03:23:16 +00:00
Nirav Dave
610fc67809
Revert "[libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types."
...
Revert "Fix initialization of array<const T, 0> with GCC."
Revert "Make array<const T, 0> non-CopyAssignable and make swap and fill ill-formed."
This reverts commit r324182, r324185, and r324194 which were causing issues with zero-length std::arrays.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324309 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 03:03:37 +00:00
Marshall Clow
6c83c7ff6f
More patches ready
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324307 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 01:59:28 +00:00
Marshall Clow
53095c7200
Add issues in 'Review'
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324292 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-05 23:50:49 +00:00
Marshall Clow
b50d2443d5
Remove <experimental/string_view>; use <string_view> instead. See https://libcxx.llvm.org/TS_deprecation.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324290 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-05 23:43:34 +00:00
Eric Fiselier
13177172d0
Fix initialization of array<const T, 0> with GCC.
...
Previously, when handling zero-sized array of const objects we
used a const version of aligned_storage_t, which is not an array type.
However, GCC complains about initialization of the form: array<const T, 0> arr = {};
This patch fixes that bug by making the dummy object used to represent
the zero-sized array an array itself. This avoids GCC's complaints
about the uninitialized const member.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324194 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 08:02:35 +00:00
Eric Fiselier
88232b14d4
Mark LWG 3014 as complete. No code changes needed
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324193 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 07:37:09 +00:00
Eric Fiselier
4d0f42850b
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324192 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 07:35:36 +00:00
Eric Fiselier
b2c07b0af2
Mark LWG 3013 as already complete. See r316941
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324191 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 07:29:53 +00:00
Eric Fiselier
9611902923
Remove debug println from rec.dir.itr.increment test
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324190 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 03:26:55 +00:00
Eric Fiselier
0b47a655ac
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324189 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 03:10:53 +00:00
Eric Fiselier
cc7688a719
Mark issue 2851 as complete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324188 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 02:45:33 +00:00
Eric Fiselier
af1fd7c75f
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324187 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 02:43:32 +00:00
Eric Fiselier
7d251c57ac
correct comment about C++03 assignment operators
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324186 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 02:22:33 +00:00
Eric Fiselier
122c064a76
Make array<const T, 0> non-CopyAssignable and make swap and fill ill-formed.
...
The standard isn't exactly clear how std::array should handle zero-sized arrays
with const element types. In particular W.R.T. copy assignment, swap, and fill.
This patch takes the position that those operations should be ill-formed,
and makes changes to libc++ to make it so.
This follows up on commit r324182.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324185 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 02:17:02 +00:00
Eric Fiselier
f3224ac007
[libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.
...
Summary:
This patch fixes llvm.org/PR35491 and LWG2157 (https://cplusplus.github.io/LWG/issue2157 )
The fix attempts to maintain ABI compatibility by replacing the array with a instance of `aligned_storage`.
Reviewers: mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: lichray, cfe-commits
Differential Revision: https://reviews.llvm.org/D41223
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324182 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-04 01:03:08 +00:00
Eric Fiselier
b173b26b9e
Work around GCC constexpr initialization bug
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324165 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-03 01:48:21 +00:00
Eric Fiselier
b232793189
Work around Clang bug introduced in r324062
...
When Clang encounters an already invalid class declaration, it can
emit incorrect diagnostics about the exception specification on
some of its members. This patch temporarily works around that
incorrect diagnostic.
The clang bug was introduced in r324062.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324164 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-03 01:45:35 +00:00
Eric Fiselier
d33aaa939c
Fix has_unique_object_representation after Clang commit r324134.
...
Clang previously reported an empty union as having a unique object
representation. This was incorrect and was fixed in a recent Clang commit.
This patch fixes the libc++ tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324153 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-02 22:39:59 +00:00
Richard Smith
b2189c01fa
Disable test in C++<11 mode due to use of alignas.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324033 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-01 23:31:22 +00:00
Richard Smith
dfb1351077
Make std::get_temporary_buffer respect overaligned types when possible
...
Patch by Chris Kennelly!
Differential Revision: https://reviews.llvm.org/D41746
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324020 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-01 22:24:45 +00:00
Marshall Clow
fd34566e5a
Put the exception classes for experimental::optional and experimental::any back in the dylib for binary compatibility
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323989 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-01 18:45:57 +00:00
Marshall Clow
b21316f66c
Remove std::experimental::sample; use std::sample instead. See https://libcxx.llvm.org/TS_deprecation.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323979 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-01 16:36:08 +00:00