summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Fix install-cxx target.Matt Morehouse2018-06-251-1/+1
| | | | | | Was broken by r334477. llvm-svn: 335507
* [CMake] Convert paths to the right form in standalone builds on WindowsMartin Storsjo2018-06-202-3/+7
| | | | | | | | | | | | | The paths output from llvm-config --cmakedir and from clang --print-libgcc-file-name can contain backslashes, while CMake can't handle the paths in this form. This matches what compiler-rt already does (since SVN r203789 and r293195). Differential Revision: https://reviews.llvm.org/D48356 llvm-svn: 335172
* Fix libcxx tests after clang r334677.Richard Smith2018-06-171-3/+7
| | | | | | Feature test macro versions may have a trailing L. llvm-svn: 334917
* Remove P0771, which was not passed in RapperswilMarshall Clow2018-06-161-1/+0
| | | | llvm-svn: 334894
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-06-1419-38/+38
| | | | llvm-svn: 334676
* [libcxx] [test] Update msvc_stdlib_force_include.hpp.Stephan T. Lavavej2018-06-141-11/+0
| | | | | | | | MSVC's STL removed _SCL_SECURE_NO_WARNINGS. MSVC's STL implemented feature-test macros. llvm-svn: 334675
* [CMake] Use common variable for all header targets NFCPetr Hosek2018-06-123-9/+8
| | | | | | This simplifies the handling of header targets. llvm-svn: 334477
* [CMake] Add a missing target dependency on C++ ABI headersPetr Hosek2018-06-122-1/+2
| | | | | | | This resolves the breakage introduced in r334468 which results in build error when using CMake Makefile generator. llvm-svn: 334470
* Reland "Use custom command and target to install libc++ headers"Petr Hosek2018-06-124-40/+243
| | | | | | | | | | | | | | | | | | | Using file(COPY FILE...) has several downsides. Since the file command is only executed at configuration time, any changes to headers made after the initial CMake execution are ignored. This can lead to subtle errors since the just built Clang will be using stale libc++ headers. Furthermore, since the headers are copied prior to executing the build system, this may hide missing dependencies on libc++ from other LLVM components. This changes replaces the use of file(COPY FILE...) command with a custom command and target which addresses all aforementioned issues and matches the implementation already used by other LLVM components that also install headers like Clang builtin headers. Differential Revision: https://reviews.llvm.org/D44773 llvm-svn: 334468
* Update the to-do list with motions from Rapperswil.Marshall Clow2018-06-121-1/+44
| | | | llvm-svn: 334467
* Mark the test using <experimental/memory_resource> to require c++experimental.Volodymyr Sapsai2018-06-111-0/+1
| | | | | | | | | | | | | | | | | 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 ... llvm-svn: 334431
* Remove unused code from __functional_base. NFC.Eric Fiselier2018-06-062-12/+2
| | | | | | | | | | | | | | Patch from Arthur O'Dwyer. `__user_alloc_construct_impl` is used by <experimental/memory_resource>, but this `__user_alloc_construct` is never used. Also, `<experimental/memory_resource>` doesn't need a full definition of `std::tuple`; just the forward declaration in `<__tuple>` will suffice. Reviewed as https://reviews.llvm.org/D46806 llvm-svn: 334069
* Fix test failures after r334053.Eric Fiselier2018-06-066-9/+20
| | | | llvm-svn: 334056
* Fix PR37694 - std::vector doesn't correctly move construct allocators.Eric Fiselier2018-06-057-30/+264
| | | | | | | | | | | | | | | | | | | 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. llvm-svn: 334053
* Fix a strict aliasing violation in map and unordered_map.Erik Pilkington2018-06-044-89/+177
| | | | | | | | | | | | These containers type-punned between pair<K, V> and pair<const K, V> as an optimization. This commit instead provides access to the pair via a pair of references that assign through to the underlying object. It's still undefined to mutate a const object, but clang doesn't optimize on this for data members, so this should be safe. Differential revision: https://reviews.llvm.org/D47607 llvm-svn: 333948
* Mark __c11_atomic_load as constJF Bastien2018-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: C++11 onwards specs the non-member functions atomic_load and atomic_load_explicit as taking the atomic<T> by const (potentially volatile) pointer. C11, in its infinite wisdom, decided to drop the const, and C17 will fix this with DR459 (the current draft forgot to fix B.16, but that’s not the normative part). This patch fixes the libc++ version of the __c11_atomic_load builtins defined for GCC's compatibility sake. D47618 takes care of the clang side. Discussion: http://lists.llvm.org/pipermail/cfe-dev/2018-May/058129.html <rdar://problem/27426936> Reviewers: EricWF, mclow.lists Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D47613 llvm-svn: 333776
* Filesystem tests: un-confuse write timeJF Bastien2018-06-011-14/+13
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 333723
* Update ABI lists after change in r333467.Eric Fiselier2018-05-298-1885/+10425
| | | | | | | | r333467 updated the symbols exported by libc++.so/dylib by changing the ODR usage of __uncaught_exception/__uncaught_exceptions. This should not be a breaking change. llvm-svn: 333481
* Mark deduction guide tests as failing on apple-clang-9JF Bastien2018-05-294-4/+4
| | | | | | | 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. llvm-svn: 333479
* Fix embarrasing typo in uncaught_exceptions. Update tests to really test ↵Marshall Clow2018-05-292-22/+30
| | | | | | this. Thanks to Peter Klotz for calling my attention to this. llvm-svn: 333467
* Mark __clear_and_shrink() as noexcept. This prevents the generation of a ↵Marshall Clow2018-05-291-2/+2
| | | | | | catch block and call to terminate in string's move assignment. Thanks to Howard for the 'catch'. llvm-svn: 333435
* LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()"Eric Fiselier2018-05-299-35/+318
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 333384
* Fix up the final bits of breakage due to clang v5 generating bad implicit ↵Marshall Clow2018-05-283-12/+17
| | | | | | template deduction guides - specifically for copy-ctors llvm-svn: 333381
* Mark the template deduction tests as UNSUPPORTED on clang 5, because it ↵Marshall Clow2018-05-282-1/+6
| | | | | | deduces the wrong type. llvm-svn: 333376
* Revert "Add nonnull; use it for atomics"JF Bastien2018-05-263-232/+23
| | | | | | | | | | | | | | That's r333325, as well as follow-up "Fix GCC handling of ATOMIC_VAR_INIT" r333327. Marshall asked to revert: Let's have a discussion about how to implement this so that it is more friendly to people with installed code bases. We've had *extremely* loud responses to unilaterally adding warnings - especially ones that can't be easily disabled - to the libc++ code base in the past. llvm-svn: 333351
* Fix GCC handling of ATOMIC_VAR_INITJF Bastien2018-05-261-2/+2
| | | | | | r333325 from D47225 added warning checks, and the test was written to be C++11 correct by using ATOMIC_VAR_INIT (note that the committee fixed that recently...). It seems like GCC can't handle ATOMIC_VAR_INIT well because it generates 'type 'std::atomic<int>' cannot be initialized with an initializer list' on bot libcxx-libcxxabi-x86_64-linux-ubuntu-cxx03. Drop the ATOMIC_VAR_INITs since they weren't required to test the diagnostics. llvm-svn: 333327
* Add nonnull; use it for atomicsJF Bastien2018-05-253-23/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The atomic non-member functions accept pointers to std::atomic / std::atomic_flag as well as to the non-atomic value. These are all dereferenced unconditionally when lowered, and therefore will fault if null. It's a tiny gotcha for new users, especially when they pass in NULL as expected value (instead of passing a pointer to a NULL value). We can therefore use the nonnull attribute to denote that: - A warning should be generated if the argument is null - It is undefined behavior if the argument is null (because a dereference will segfault) This patch adds support for this attribute for clang and GCC, and sticks to the subset of the syntax both supports. In particular, work around this GCC oddity: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60625 The attributes are documented: - https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Function-Attributes.html - https://clang.llvm.org/docs/AttributeReference.html#nullability-attributes I'm authoring a companion clang patch for the __c11_* and __atomic_* builtins, which currently only warn on a subset of the pointer parameters. In all cases the check needs to be explicit and not use the empty nonnull list, because some of the overloads are for atomic<T*> and the values themselves are allowed to be null. <rdar://problem/18473124> Reviewers: arphaman, EricWF Subscribers: aheejin, christof, cfe-commits Differential Revision: https://reviews.llvm.org/D47225 llvm-svn: 333325
* Fix optional<char> test breakageJF Bastien2018-05-251-0/+4
| | | | | | It seems GCC and clang disagree. Talked to mclow on IRC, disabling for now. llvm-svn: 333317
* Fix array deduction guide test breakageJF Bastien2018-05-251-0/+3
| | | | | | No matching constructor llvm-svn: 333315
* Fix optional deduction guide test breakageJF Bastien2018-05-252-2/+2
| | | | llvm-svn: 333308
* Add one more test for optionalMarshall Clow2018-05-251-5/+14
| | | | llvm-svn: 333252
* Add deduction guides for optionalMarshall Clow2018-05-253-0/+91
| | | | llvm-svn: 333251
* Do not define template specialization __libcpp_is_floating_point<__fp16>Akira Hatanaka2018-05-232-0/+4
| | | | | | | | if the compiler is not clang. gcc doesn't allow using __fp16 on non-ARM targets. llvm-svn: 333108
* Teach __libcpp_is_floating_point that __fp16 and _Float16 areAkira Hatanaka2018-05-232-0/+26
| | | | | | | | floating-point types. rdar://problem/40377353 llvm-svn: 333103
* Mark more bits of P0433 as complete.Marshall Clow2018-05-231-2/+2
| | | | llvm-svn: 333058
* Implement deduction guides for basic_regexMarshall Clow2018-05-233-0/+196
| | | | llvm-svn: 333050
* [libcxx] [test] Mark the test as unsupported by apple-clang-8.1.Volodymyr Sapsai2018-05-221-1/+1
| | | | llvm-svn: 333011
* Change the names of two private methods: allocate -> __vallocate and ↵Marshall Clow2018-05-221-41/+41
| | | | | | deallocate -> __vdeallocate. NFC. This change triggered by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61806, which shows up when we implement deduction guides for the container adaptors.The names have a 'v' in them because WIN32 has a macro named __deallocate. (sigh). llvm-svn: 332996
* Missed the tests for the deduction guides for prority_queueMarshall Clow2018-05-222-0/+181
| | | | llvm-svn: 332931
* Deduction guides for the container adaptors - queue, stack, and priority_queueMarshall Clow2018-05-226-0/+367
| | | | llvm-svn: 332927
* Implement deduction guides for vectorMarshall Clow2018-05-213-7/+184
| | | | llvm-svn: 332901
* Deduction guides for listMarshall Clow2018-05-203-2/+169
| | | | llvm-svn: 332818
* Implement deduction guides for forward_listMarshall Clow2018-05-193-0/+167
| | | | llvm-svn: 332811
* Remove expression '1L + INT_MAX', because it overflows on machines where ↵Marshall Clow2018-05-191-2/+2
| | | | | | int/long are the same size llvm-svn: 332797
* Implement deduction guides for <deque>Marshall Clow2018-05-183-3/+166
| | | | llvm-svn: 332785
* Disable 'missing-braces' warningMarshall Clow2018-05-182-0/+9
| | | | llvm-svn: 332779
* Implement deduction guides for <array>; Reviewed as ↵Marshall Clow2018-05-183-1/+102
| | | | | | https://reviews.llvm.org/D46964 llvm-svn: 332768
* [libcxx] [test] Remove unused local typedef in ↵Billy Robert O'Neal III2018-05-171-1/+0
| | | | | | test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp llvm-svn: 332571
* Add void casts to suppress nodiscard on linear_congruential_engine.Billy Robert O'Neal III2018-05-172-3/+3
| | | | llvm-svn: 332567
* Condition usage of locale stdlib functions on Android API versionPeter Collingbourne2018-05-161-7/+8
| | | | | | | | | | | | Some *_l functions were not available in some versions of Bionic. This CL checks that the NDK version supports the functions, and if not, falls back on the corresponding functions that don't take a locale. Patch by Tom Anderson! Differential Revision: https://reviews.llvm.org/D46558 llvm-svn: 332543
OpenPOWER on IntegriCloud