summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Use multi-key tree search for {map, set}::{count, equal_range}Eric Fiselier2018-02-1010-6/+448
| | | | | | | | | | | | | | | | | | | | | | | Patch from ngolovliov@gmail.com Reviewed as: https://reviews.llvm.org/D42344 As described in llvm.org/PR30959, the current implementation of std::{map, key}::{count, equal_range} in libcxx is non-conforming. Quoting the C++14 standard [associative.reqmts]p3 > The phrase “equivalence of keys” means the equivalence relation imposed by > the comparison and not the operator== on keys. That is, two keys k1 and k2 are > considered to be equivalent if for the comparison object comp, > comp(k1, k2) == false && comp(k2, k1) == false. In the same section, the requirements table states the following: > a.equal_range(k) equivalent to make_pair(a.lower_bound(k), a.upper_bound(k)) > a.count(k) returns the number of elements with key equivalent to k The behaviour of libstdc++ seems to conform to the standard here. llvm-svn: 324799
* The apple versions of clang don't support deduction guides yet.Marshall Clow2018-02-082-0/+2
| | | | llvm-svn: 324640
* Once more, with feeling. Spell 'clang-4.0' correctly this timeMarshall Clow2018-02-082-2/+2
| | | | llvm-svn: 324624
* Clean up string's deduction guides tests. Mark old versions of clang as ↵Marshall Clow2018-02-083-58/+83
| | | | | | unsupported, b/c they don't have deduction guides, even in C++17 mode llvm-svn: 324619
* Update the status of removed componentsMarshall Clow2018-02-081-14/+14
| | | | llvm-svn: 324609
* [libcxx] Avoid spurious construction of valarray elementsMikhail Maltsev2018-02-085-21/+139
| | | | | | | | | | | | | | | | | | | | | Summary: Currently libc++ implements some operations on valarray by using the resize method. This method has a parameter with a default value. Because of this, valarray may spuriously construct and destruct objects of valarray's element type. This patch fixes this issue and adds corresponding test cases. Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: rogfer01, cfe-commits Differential Revision: https://reviews.llvm.org/D41992 llvm-svn: 324596
* Temporarily comment out deduction guide tests while I figure out what to do ↵Marshall Clow2018-02-082-0/+3
| | | | | | with old bots llvm-svn: 324573
* Implement deduction guide for basic_string as described in P0433Marshall Clow2018-02-084-2/+132
| | | | llvm-svn: 324569
* Improve a test. NFCMarshall Clow2018-02-081-0/+1
| | | | llvm-svn: 324566
* Fix size and alignment of array<T, 0>.Eric Fiselier2018-02-073-4/+22
| | | | | | | | An array T[1] isn't necessarily the same say when it's a member of a struct. This patch addresses that problem and corrects the tests to deal with it. llvm-svn: 324545
* Stop using __strtonum_fallback on Android.Dan Albert2018-02-071-1/+0
| | | | | | | Fallback implementations are now provided by bionic when necessary, which these may conflict with. llvm-svn: 324534
* Fix PR#31454 - 'basic_string<T>::push_back() crashes if ↵Marshall Clow2018-02-072-5/+8
| | | | | | 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. llvm-svn: 324531
* Fix -verify static assert messages for older Clang versionsEric Fiselier2018-02-072-2/+2
| | | | llvm-svn: 324529
* [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default ↵Eric Fiselier2018-02-0719-26/+805
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 324526
* Comment on 'Review' issuesMarshall Clow2018-02-071-8/+8
| | | | llvm-svn: 324503
* Remove more of the std::experimental bits that are now in std::. All the _v ↵Marshall Clow2018-02-0650-3997/+4
| | | | | | type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 324423
* Mark P0777 as completeMarshall Clow2018-02-061-2/+2
| | | | llvm-svn: 324399
* Implement P0777: Treating unnecessay decayMarshall Clow2018-02-064-14/+12
| | | | llvm-svn: 324398
* Fix building libc++ with the macOS 10.13 SDK with -mmacosx-version-min=10.12 ↵Nico Weber2018-02-061-4/+29
| | | | | | | | | | | | | | | | | 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. llvm-svn: 324385
* Fix misleading indentation; replace a couple of NULLs with nullptr. Resolves ↵Marshall Clow2018-02-062-7/+7
| | | | | | https://reviews.llvm.org/D42945 ; thanks to Bruce Mitchener for the patch. llvm-svn: 324378
* No, really this time mark 3034 as 'Patch Ready'Marshall Clow2018-02-061-2/+2
| | | | llvm-svn: 324312
* Mark issue 3034 as 'Patch Ready'Marshall Clow2018-02-061-2/+2
| | | | llvm-svn: 324310
* Revert "[libc++] Fix PR35491 - std::array of zero-size doesn't work with ↵Nirav Dave2018-02-068-276/+17
| | | | | | | | | | | 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. llvm-svn: 324309
* More patches readyMarshall Clow2018-02-061-7/+7
| | | | llvm-svn: 324307
* Add issues in 'Review'Marshall Clow2018-02-051-3/+23
| | | | llvm-svn: 324292
* Remove <experimental/string_view>; use <string_view> instead. See ↵Marshall Clow2018-02-0584-17023/+1
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 324290
* Fix initialization of array<const T, 0> with GCC.Eric Fiselier2018-02-041-8/+6
| | | | | | | | | | | | 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. llvm-svn: 324194
* Mark LWG 3014 as complete. No code changes neededEric Fiselier2018-02-041-2/+2
| | | | llvm-svn: 324193
* Implement LWG 3014 - Fix more noexcept issues in filesystem.Eric Fiselier2018-02-045-14/+14
| | | | | | | | | 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
* Mark LWG 3013 as already complete. See r316941Eric Fiselier2018-02-041-2/+2
| | | | llvm-svn: 324191
* Remove debug println from rec.dir.itr.increment testEric Fiselier2018-02-041-2/+0
| | | | llvm-svn: 324190
* Implement LWG2989: path's streaming operators allow everything under the sun.Eric Fiselier2018-02-043-37/+72
| | | | | | | | | | | | | | | 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
* Mark issue 2851 as completeEric Fiselier2018-02-041-2/+2
| | | | llvm-svn: 324188
* Address LWG 2849 and fix missing failure condition in copy_file.Eric Fiselier2018-02-043-13/+28
| | | | | | | Previously copy_file didn't handle the case where the input and output were the same file. llvm-svn: 324187
* correct comment about C++03 assignment operatorsEric Fiselier2018-02-041-4/+4
| | | | llvm-svn: 324186
* Make array<const T, 0> non-CopyAssignable and make swap and fill ill-formed.Eric Fiselier2018-02-045-10/+181
| | | | | | | | | | | | 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. llvm-svn: 324185
* [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default ↵Eric Fiselier2018-02-045-16/+106
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 324182
* Work around GCC constexpr initialization bugEric Fiselier2018-02-031-1/+1
| | | | llvm-svn: 324165
* Work around Clang bug introduced in r324062Eric Fiselier2018-02-031-0/+5
| | | | | | | | | | | 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. llvm-svn: 324164
* Fix has_unique_object_representation after Clang commit r324134.Eric Fiselier2018-02-021-2/+4
| | | | | | | | | 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. llvm-svn: 324153
* Disable test in C++<11 mode due to use of alignas.Richard Smith2018-02-011-0/+2
| | | | llvm-svn: 324033
* Make std::get_temporary_buffer respect overaligned types when possibleRichard Smith2018-02-012-1/+81
| | | | | | | | Patch by Chris Kennelly! Differential Revision: https://reviews.llvm.org/D41746 llvm-svn: 324020
* Put the exception classes for experimental::optional and experimental::any ↵Marshall Clow2018-02-012-0/+39
| | | | | | back in the dylib for binary compatibility llvm-svn: 323989
* Remove std::experimental::sample; use std::sample instead. See ↵Marshall Clow2018-02-014-259/+2
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323979
* Remove <experimental/numeric>; use <numeric> instead. See ↵Marshall Clow2018-02-0120-720/+1
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323975
* Remove <experimental/any>; use <any> instead. See ↵Marshall Clow2018-02-0128-2575/+1
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323972
* Remove <experimental/optional>; use <optional> instead. See ↵Marshall Clow2018-02-0172-5262/+1
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323971
* Add static_asserts to basic_ios and basic_stream_buf to ensure that that the ↵Marshall Clow2018-02-017-0/+139
| | | | | | traits match the character type. This is a requirement on the user - now we get consistent failures at compile time instead of incomprehensible error messages or runtime failures. This is also LWG#2994 - not yet adopted. llvm-svn: 323945
* Implement LWG2870: Default value of parameter theta of polar should be dependentMarshall Clow2018-01-313-5/+5
| | | | llvm-svn: 323918
* Add LWG3051Marshall Clow2018-01-301-0/+2
| | | | llvm-svn: 323822
OpenPOWER on IntegriCloud