summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* First cut at issue statuses for JAXMarshall Clow2018-01-301-51/+63
| | | | llvm-svn: 323720
* Add tests to make sure that <string_view> provides std::size/data/empty in ↵Marshall Clow2018-01-305-1/+40
| | | | | | C++17 mode. This is LWG#3009, coming up for a vote in JAX - but we already do it, just don't have tests llvm-svn: 323719
* Minor updated to the main libcxx page; add a link to the deprecation pageMarshall Clow2018-01-291-6/+9
| | | | llvm-svn: 323694
* LLVM_FOUND isn't always set, so just test if llvm_setup_rpath() isDon Hinton2018-01-271-1/+1
| | | | | | available instead. llvm-svn: 323599
* Fix the BinaryPredicate form of std::is_permutation to not rely on operator==Peter Collingbourne2018-01-262-2/+34
| | | | | | | | | | | | | | | | According to [1], forms 2 and 4 of std::is_permutation should use the passed in binary predicate to compare elements. operator== should only be used for forms 1 and 3 which do not take a binary predicate. This CL fixes forms 2 and 4 which relied on operator== for some comparisons. [1] http://en.cppreference.com/w/cpp/algorithm/is_permutation Patch by Thomas Anderson! Differential Revision: https://reviews.llvm.org/D42518 llvm-svn: 323563
* Reland: [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.Don Hinton2018-01-261-0/+3
| | | | | | | | | Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42459 llvm-svn: 323492
* libcxx: Use vcruntime declarations for typeinfo on Windows.Peter Collingbourne2018-01-263-3/+10
| | | | | | | | | | | We need to use the vcruntime declarations on Windows to avoid an ODR violation involving rtti.obj, which provides the definition of the runtime function implementing dynamic_cast and depends on the vcruntime implementations of bad_cast and bad_typeid. Differential Revision: https://reviews.llvm.org/D42220 llvm-svn: 323491
* libcxx: Move #include_next <math.h> out of header guard in wrapper header.Peter Collingbourne2018-01-262-2/+33
| | | | | | | | | | | | | | | Code on Windows expects to be able to do: #define _USE_MATH_DEFINES #include <math.h> and receive the definitions of mathematical constants, even if <math.h> has previously been included. To support this scenario, re-include <math.h> every time the wrapper header is included. Differential Revision: https://reviews.llvm.org/D42403 llvm-svn: 323490
* Mark 2903 as complete; we already do thisMarshall Clow2018-01-251-2/+2
| | | | llvm-svn: 323479
* Revert [libcxx] r323453 - [cmake] [libcxx] Call llvm_setup_rpath() when ↵Don Hinton2018-01-251-1/+0
| | | | | | | | | | adding shared libraries. Shoaib Meenai pointed out this will break standalone builds when built without llvm. Differential Revision: https://reviews.llvm.org/D42459 llvm-svn: 323459
* [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.Don Hinton2018-01-251-0/+1
| | | | | | | | | Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42459 llvm-svn: 323453
* Fix PR35564 - std::list splice/erase incorrectly throw in debug mode.Eric Fiselier2018-01-252-4/+61
| | | | | | | | | | | | There was a bug in the implementation of splice where the container sizes were updated before decrementing one of the iterators. Afterwards, the result of decrementing the iterator was flagged as UB by the debug implementation because the container was reported to be empty. This patch fixes that bug by delaying the updating of the container sizes until after the iterators have been correctly constructed. llvm-svn: 323390
* Fix missing return in __tuple_leaf::__can_bind_reference when ↵Eric Fiselier2018-01-241-0/+2
| | | | | | __reference_binds_to_temporary added in r323380. llvm-svn: 323389
* Implement LWG2783: stack::emplace() and queue::emplace() should return ↵Marshall Clow2018-01-245-26/+64
| | | | | | decltype(auto) llvm-svn: 323385
* [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference ↵Eric Fiselier2018-01-244-61/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binding in std::tuple. Summary: See https://bugs.llvm.org/show_bug.cgi?id=20855 Libc++ goes out of it's way to diagnose `std::tuple` constructions which are UB due to lifetime bugs caused by reference creation. For example: ``` // The 'const std::string&' is created *inside* the tuple constructor, and its lifetime is over before the end of the constructor call. std::tuple<int, const std::string&> t(std::make_tuple(42, "abc")); ``` However, we are over-aggressive and we incorrectly diagnose cases such as: ``` void foo(std::tuple<int const&, int const&> const&); foo(std::make_tuple(42, 42)); ``` This patch fixes the incorrectly diagnosed cases, as well as converting the diagnostic to use the newly added Clang trait `__reference_binds_to_temporary`. The new trait allows us to diagnose cases we previously couldn't such as: ``` std::tuple<int, const std::string&> t(42, "abc"); ``` Reviewers: rsmith, mclow.lists Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41977 llvm-svn: 323380
* [libcxx] Correctly handle invalid regex character class namesMikhail Maltsev2018-01-242-1/+38
| | | | | | | | | | | | | | | | | | | | Summary: Currently when a regular expression contains an invalid character class name std::regex constructors throw an std::regex_error with std::regex_constants::error_brack code. This patch changes the code to std::regex_constants::error_ctype and adds a test. Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42291 llvm-svn: 323322
* include <cstdint> to get uint32_tMarshall Clow2018-01-241-0/+1
| | | | llvm-svn: 323306
* libcxx: Allow auto-linking to be disabled with a macro.Peter Collingbourne2018-01-241-5/+7
| | | | | | | | | | | Some users may have a custom build system which gives a different name to the libc++ archive (or does not create an archive at all, instead passing the object files directly to the linker). Give those users a way to disable auto-linking. Differential Revision: https://reviews.llvm.org/D42436 llvm-svn: 323300
* Implement P0463R1: 'Endian just Endian'. Reviewed as ↵Marshall Clow2018-01-242-0/+62
| | | | | | https://reviews.llvm.org/D35472 llvm-svn: 323296
* libcxx: Rename vasprintf function to __libcpp_vasprintf.Peter Collingbourne2018-01-233-9/+4
| | | | | | | | | | | The language standard does not define a function with this name, so it is part of the user's namespace. This change fixes a duplicate symbol error that occurs when a user attempts to define a function with this name. Differential Revision: https://reviews.llvm.org/D42405 llvm-svn: 323237
* [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ↵Don Hinton2018-01-231-1/+1
| | | | | | | | ones. * Previously part of https://reviews.llvm.org/D41622. llvm-svn: 323171
* libcxx: Provide overloads for basic_filebuf::open() et al that take wchar_t* ↵Peter Collingbourne2018-01-2311-0/+500
| | | | | | | | | | | | filenames on Windows. This is an MSVC standard library extension. It seems like a reasonable enough extension to me because wchar_t* is the native format for filenames on that platform. Differential Revision: https://reviews.llvm.org/D42225 llvm-svn: 323170
* libcxx: Move Windows threading support into a .cpp file.Peter Collingbourne2018-01-232-266/+307
| | | | | | | | | This allows us to avoid polluting the namespace of users of <thread> with the definitions in windows.h. Differential Revision: https://reviews.llvm.org/D42214 llvm-svn: 323169
* Update cxx2a statusMarshall Clow2018-01-221-5/+8
| | | | llvm-svn: 323160
* Last batch of P0202 constexpr additions: includes/set_intersection/exchangeMarshall Clow2018-01-227-17/+128
| | | | llvm-svn: 323159
* Another batch of P0202 constepr algirithms. ↵Marshall Clow2018-01-227-18/+127
| | | | | | remove/remove_if/remove_copy/remove_copy_if/reverse_copy, and tests (commented out) for rotate_copy, because that depends on std::copy llvm-svn: 323152
* Still more P0202 constexpr-ifying. This batch is: ↵Marshall Clow2018-01-226-17/+108
| | | | | | for_each/for_each_n/lexicographical_compare llvm-svn: 323147
* [cmake] [libcxx] Fix find_path() problems when cross compiling.Don Hinton2018-01-221-0/+1
| | | | | | | | | | | | | | | When CMAKE_SYSROOT or CMAKE_FIND_ROOT_PATH is set, cmake recommends setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY globally which means find_path() always prepends CMAKE_SYSROOT or CMAKE_FIND_ROOT_PATH to all paths used in the search. However, this find_path() invocation is looking for a path in the libcxxabi project on the host system, not the target system, which can be done by passing NO_CMAKE_FIND_ROOT_PATH. Differential Revision: https://reviews.llvm.org/D41622 llvm-svn: 323143
* Add (commented out) constexpr tests for copy/copy_backwards/copy_if/copy_n. ↵Marshall Clow2018-01-224-4/+74
| | | | | | These will be enabled when that part of P0202 is implemented. NFC at this time. llvm-svn: 323137
* Really comment out the constexpr tests.Marshall Clow2018-01-222-30/+30
| | | | llvm-svn: 323072
* Change a static_assert to check for is_trivial instead of is_pod, as is ↵Marshall Clow2018-01-222-2/+2
| | | | | | mandated by P0767. llvm-svn: 323071
* implement (but leave commented out) the constexpr tests from P0202 for ↵Marshall Clow2018-01-222-2/+47
| | | | | | std::merge. merge requires std::copy, which isn't constexpr yet. llvm-svn: 323070
OpenPOWER on IntegriCloud