summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] Fix XFAIL for GCC 4.9Louis Dionne2018-11-191-1/+1
| | | | | | | | | The XFAIL started passing since we're only testing for trivial-copyability of reference_wrapper in C++14 and above. This commit constrains the XFAIL to gcc-4.9 with C++14 (it would also fail on C++17 and above, but those standards are not available with GCC 4.9). llvm-svn: 347264
* [libcxx] Update test of trivial copyability of reference_wrapperLouis Dionne2018-11-191-3/+4
| | | | | | N4151 is not an extension anymore, it was standardized in C++14. llvm-svn: 347263
* [libcxx] Add missing <cstddef> includes in testsLouis Dionne2018-11-191-0/+1
| | | | | | | | | | | Some tests use type std::max_align_t, but don't include <cstddef> header directly. As a result, these tests won't compile against some conformant libraries. Reviewed as https://reviews.llvm.org/D54645. Thanks to Andrey Maksimov for the patch. llvm-svn: 347232
* [libcxx] Add availability markup for bad_optional_access, bad_variant_access ↵Louis Dionne2018-11-1945-240/+322
| | | | | | | | | | | | and bad_any_cast Reviewers: dexonsmith, EricWF Subscribers: christof, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D53256 llvm-svn: 347219
* Get tests compiling with -Wunused-local-typedefEric Fiselier2018-11-1528-35/+0
| | | | llvm-svn: 346914
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-11-14117-375/+374
| | | | llvm-svn: 346826
* Implement P0972R0: <chrono> zero(), min(), and max() should be noexcept. ↵Marshall Clow2018-11-138-8/+57
| | | | | | Reviewed as https://reviews.llvm.org/D53828 llvm-svn: 346766
* [libcxx] Implement http://wg21.link/p1006, constexpr in pointer_traitsLouis Dionne2018-11-131-3/+14
| | | | | | | | | | | | | | | | Summary: P1006 adds support for constexpr in the specialization of pointer_traits for raw pointers. This is necessary in order to use pointer_traits in the upcoming constexpr containers. We expect P1006 to be voted into the working draft for C++20 at the San Diego meeting. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D53867 llvm-svn: 346764
* [NFC] Reformat std::optional testsLouis Dionne2018-11-122-4/+4
| | | | llvm-svn: 346630
* Work around gcc.gnu.org/PR87766Eric Fiselier2018-10-261-1/+1
| | | | llvm-svn: 345425
* Adjust unsupported C++ versions in some testsMikhail Maltsev2018-10-24174-174/+174
| | | | | | | | | | | | | | | | | | | | Summary: Some tests (mainly the new C++20 calendar library) fail when libc++ is tested with '--param=std=c++98'. The failures happen because the tests actually don't support C++98, but don't mention C++98 in the 'UNSUPPORTED:' line. This change fixes the issue. Reviewers: mclow.lists, ldionne Reviewed By: ldionne Subscribers: arphaman, michaelplatings, libcxx-commits Differential Revision: https://reviews.llvm.org/D53640 llvm-svn: 345148
* [libcxx] Mark chrono literal unit tests as being unsupported on AppleClang 10Louis Dionne2018-10-174-4/+4
| | | | llvm-svn: 344661
* Recommit <chrono> changes with a couple xtra tests marked to fail on apple's ↵Marshall Clow2018-10-16178-1/+9864
| | | | | | clang. Reviewed as D51762 llvm-svn: 344627
* Re-apply r344546 "Mark a couple of test cases as 'C++17-only'..."Artem Dergachev2018-10-162-2/+6
| | | | | | Reverted too much in r344580. llvm-svn: 344582
* Revert r344529 "Implement the first part of the calendar support for C++20"Artem Dergachev2018-10-16181-9927/+2
| | | | | | | | | | Revert r344535 "Wrap up the new chrono literals in an #ifdef..." Revert r344546 "Mark a couple of test cases as 'C++17-only'..." Some of the buildbot failures were masked by another error, and this one was probably missed. llvm-svn: 344580
* Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232Marshall Clow2018-10-152-2/+6
| | | | llvm-svn: 344546
* Wrap up the new chrono literals in an #ifdef so that old versions of clang ↵Marshall Clow2018-10-152-0/+4
| | | | | | don't complain. I'm looking at you, clang 5.0.1 llvm-svn: 344535
* Implement the first part of the calendar support for C++20. This is still ↵Marshall Clow2018-10-15179-0/+9917
| | | | | | incomplete; there will be more patches coming. Reviewed as D51762 llvm-svn: 344529
* Add a test that shows what happens with throwing destructors. NFC.Marshall Clow2018-10-111-0/+11
| | | | llvm-svn: 344220
* [libcxx] Fix the binder deprecation tests on Clang 5.Louis Dionne2018-09-234-24/+8
| | | | | | Tested on Docker containers with Clang 4, 5 and 6. llvm-svn: 342855
* [libcxx] Fix buildbots on DebianLouis Dionne2018-09-234-0/+4
| | | | | | | | | | | | | | | | Debian build bots are running Clang 4, which apparently does not support the "deprecated" attribute properly. Clang pretends to support the attribute, but the attribute doesn't do anything. (live example: https://wandbox.org/permlink/0De69aXns0t1D59r) On a separate note, I'm not sure I understand why we're even running the libc++ tests under Clang-4. Is this a configuration we support? I can understand that libc++ should _build_ with Clang 4, but it's not clear to me that new libc++ headers should be usable under older compilers like that. llvm-svn: 342854
* [libc++] Add deprecated attributes to many deprecated componentsLouis Dionne2018-09-234-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These deprecation warnings are opt-in: they are only enabled when the _LIBCXX_DEPRECATION_WARNINGS macro is defined, which is not the case by default. Note that this is a first step in the right direction, but I wasn't able to get an exhaustive list of all deprecated components per standard, so there's certainly stuff that's missing. The list of components this commit marks as deprecated is: in C++11: - auto_ptr, auto_ptr_ref - binder1st, binder2nd, bind1st(), bind2nd() - pointer_to_unary_function, pointer_to_binary_function, ptr_fun() - mem_fun_t, mem_fun1_t, const_mem_fun_t, const_mem_fun1_t, mem_fun() - mem_fun_ref_t, mem_fun1_ref_t, const_mem_fun_ref_t, const_mem_fun1_ref_t, mem_fun_ref() in C++14: - random_shuffle() in C++17: - unary_negate, binary_negate, not1(), not2() <rdar://problem/18168350> Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48912 llvm-svn: 342843
* Fix diagnostic regex in variant tests to tolerate older clang versionsEric Fiselier2018-09-201-1/+1
| | | | llvm-svn: 342609
* Don't require relops on variant alternatives to all return the sameEric Fiselier2018-09-192-29/+166
| | | | | | | | | | | | type. Libc++ correctly asserts that a set of visitors for a variant all return the same type. However, we use the visitation machinary to perform relational operations. This causes a static assertion when some of the alternatives relops return a UDT which is implicitly convertible to bool instead of 'bool' exactly. llvm-svn: 342560
* Last week, someone noted that a couple of the time_point member functions ↵Marshall Clow2018-08-292-0/+40
| | | | | | were not constexpr. I looked, and they were right. They were made constexpr in p0505, so I looked at all the other bits in that paper to make sure that I didn't miss anything else. There were a couple methods in the synopsis that should have been marked constexpr, but the code was correct. llvm-svn: 340992
* Use addressof instead of operator& in make_shared. Fixes PR38729. As a ↵Marshall Clow2018-08-284-0/+32
| | | | | | drive-by, make the same change in raw_storage_iterator (twice). llvm-svn: 340823
* Selectively import timespec_get into namespace std, since some C libraries ↵Marshall Clow2018-08-151-1/+1
| | | | | | don't have it. Reviewed as https://reviews.llvm.org/D50799 llvm-svn: 339816
* [libcxx] Mark charconv tests as failing for previous libcxx versions.Volodymyr Sapsai2018-08-102-0/+18
| | | | | | | | | | | | | | | <charconv> was added in r338479. Previous libcxx versions don't have this functionality and corresponding tests should be failing. Reviewers: mclow.lists, ldionne, EricWF Reviewed By: ldionne Subscribers: christof, dexonsmith, lichray, EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D50543 llvm-svn: 339451
* [libcxx] [test] Remove asserts that <cstddef> and <stdexcept> are included ↵Billy Robert O'Neal III2018-08-081-10/+1
| | | | | | | | by <bitset> Reviewed as https://reviews.llvm.org/D50421 llvm-svn: 339212
* [libcxx] [test] Add missing <stdexcept> in several tests.Billy Robert O'Neal III2018-08-084-0/+4
| | | | | | Reviewed as https://reviews.llvm.org/D50420 llvm-svn: 339209
* Mark LWG#2260 as complete. We already did the right thing, so I just added ↵Marshall Clow2018-08-032-0/+2
| | | | | | tests to ensure that we continue to DTRT. llvm-svn: 338936
* Implement P0887: The identity metafunctionMarshall Clow2018-08-021-0/+40
| | | | llvm-svn: 338666
* [libc++] Fix build failures after merging <charconv>Zhihao Yuan2018-08-011-0/+1
| | | | | | | | | | | | | | Summary: - fix a stupid unit test typo - add <charconv> symbols to Linux abilist Reviewers: EricWF Subscribers: christof, ldionne, cfe-commits Differential Revision: https://reviews.llvm.org/D50130 llvm-svn: 338486
* [libc++][C++17] Elementary string conversions for integral typesZhihao Yuan2018-08-014-0/+321
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Major QoI considerations: - The facility is backported to C++14, same as libstdc++. - Efforts have been made to minimize the header dependencies. - The design is friendly to the uses of MSVC intrinsics (`__emulu`, `_umul128`, `_BitScanForward`, `_BitScanForward64`) but not implemented; future contributions are welcome. Thanks to Milo Yip for contributing the implementation of `__u64toa` and `__u32toa`. References: https://wg21.link/p0067r5 https://wg21.link/p0682r1 Reviewers: mclow.lists, EricWF Reviewed By: mclow.lists Subscribers: ldionne, Quuxplusone, christof, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D41458 llvm-svn: 338479
* import timespec and timespec_get into namespace std if we're under c++17 or ↵Marshall Clow2018-07-311-0/+16
| | | | | | later AND the underlying C library has them. Fixes PR#38220, but doesn't implement all of P0063 yet. llvm-svn: 338419
* [test] two small cleanups:Casey Carter2018-07-092-5/+2
| | | | | | | | * Remove unused type from is_assignable.pass.cpp * Don't specialize `common_type<::X<float>>` in common_type.pass.cpp, which violates the requirements of [meta.trans.other]/5 llvm-svn: 336618
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-06-142-2/+2
| | | | llvm-svn: 334676
* Mark deduction guide tests as failing on apple-clang-9JF Bastien2018-05-291-1/+1
| | | | | | | 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 up the final bits of breakage due to clang v5 generating bad implicit ↵Marshall Clow2018-05-282-9/+14
| | | | | | template deduction guides - specifically for copy-ctors llvm-svn: 333381
* 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 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-252-0/+82
| | | | llvm-svn: 333251
* Update XFAIL so apple-clang-9.0 is the last version not implementing Core 2094.Volodymyr Sapsai2018-05-141-1/+1
| | | | | | The test is passing with apple-clang-9.1. rdar://problem/40222003 llvm-svn: 332282
* Fix failing test due to incorrect use of noexceptEric Fiselier2018-05-111-14/+0
| | | | llvm-svn: 332066
* Fix PR37407 - callable traits don't correctly check complete types.Eric Fiselier2018-05-102-1/+37
| | | | | | | | | | | | | Checking for complete types is really rather tricky when you consider the amount of specializations required to check a function type. This specifically caused PR37407 where we incorrectly diagnosed noexcept function types as incomplete (but there were plenty of other cases that would cause this). This patch removes the complete type checking for now. I'm going to look into adding a clang builtin to correctly do this for us. llvm-svn: 332040
* [libcxx] func.wrap.func.con: Unset function before destroying anythingVolodymyr Sapsai2018-04-252-0/+92
| | | | | | | | | | | | | | | | | | | | Be defensive against a reentrant std::function::operator=(nullptr_t), in case the held function object has a non-trivial destructor. Destroying the function object in-place can lead to the destructor being called twice. Patch by Duncan P. N. Exon Smith. C++03 support by Volodymyr Sapsai. rdar://problem/32836603 Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits, arphaman Differential Revision: https://reviews.llvm.org/D34331 llvm-svn: 330885
* [libcxx] [test] Fix whitespace, NFC.Stephan T. Lavavej2018-04-121-1/+1
| | | | | | test/std almost always uses spaces; now it is entirely tab-free. llvm-svn: 329978
* [libcxx] [test] Avoid MSVC truncation warnings.Stephan T. Lavavej2018-04-123-4/+4
| | | | | | | | | | | | | | | | | | | MSVC emits "warning C4244: 'initializing': conversion from 'int' to 'short', possible loss of data" when it sees pair<Whatever, short> constructed from (whatever, 4), because int is being truncated to short within pair's constructor. (The compiler doesn't take into account the fact that 4 is a literal at the callsite; it generates this warning when the constructor is instantiated, because it might be called with a runtime-valued int that would actually truncate.) Instead of static_cast<short>, we can simply change short to int in these tests, without affecting the pair operations that they're trying to test: move assignment, convert copy construction, and convert move construction. Fixes D45016. llvm-svn: 329973
* [test] [NFC] cleanup aligned_storage testCasey Carter2018-04-091-106/+55
| | | | | | | * `s/"" )/"")/g` * Don't redundantly test triviality for `TEST_STD_VER > 17` llvm-svn: 329618
OpenPOWER on IntegriCloud