summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* One more local type warning removed from the tests. NFCMarshall Clow2018-10-121-8/+12
| | | | llvm-svn: 344421
* Update the array tests to not use a local type; removes warnings in C++03. NFCMarshall Clow2018-10-123-9/+13
| | | | llvm-svn: 344417
* Update all the max_size tests to eliminate signed/unsigned comparison ↵Marshall Clow2018-10-1212-62/+62
| | | | | | warnings. NFC llvm-svn: 344416
* Add a test that shows what happens with throwing destructors. NFC.Marshall Clow2018-10-111-0/+11
| | | | llvm-svn: 344220
* [libcxx] Mark std::async race condition test as unsupported on DarwinLouis Dionne2018-10-091-0/+4
| | | | | | | | | | PR38682 added a test to check for a race condition in std::future. Part of the fix is part of the dylib, but there is no released version of mac OS X that ships a dylib containing the fix. Hence, this test can (and sometimes does) when testing on OS X. This commit marks the test as unsupported to avoid spurious failures. llvm-svn: 344053
* Mork more tests as FLAKYEric Fiselier2018-10-012-1/+2
| | | | llvm-svn: 343435
* Fix threaded test under no-threading configurationEric Fiselier2018-10-012-0/+4
| | | | llvm-svn: 343432
* [libcxx] Fix the binder deprecation tests on Clang 5.Louis Dionne2018-09-238-48/+16
| | | | | | Tested on Docker containers with Clang 4, 5 and 6. llvm-svn: 342855
* [libcxx] Fix buildbots on DebianLouis Dionne2018-09-238-0/+8
| | | | | | | | | | | | | | | | 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-238-0/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 UB in SIMD tests.Eric Fiselier2018-09-221-1/+1
| | | | | | | | | One of the SIMD tests attempted to left shift a value by 42, which is UB when the left hand side is a 32 bit integer type. This patch adjusts the test to use the value 4 instead of 42. llvm-svn: 342820
* Mark test as flakyEric Fiselier2018-09-221-0/+2
| | | | llvm-svn: 342818
* Fix diagnostic regex in variant tests to tolerate older clang versionsEric Fiselier2018-09-201-1/+1
| | | | llvm-svn: 342609
* Revert "Implement LWG 2221 - No formatted output operator for nullptr."Volodymyr Sapsai2018-09-191-80/+0
| | | | | | | | | This reverts r342566 as it causes on bots linker errors like > Undefined symbols for architecture i386: > "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(std::nullptr_t)", referenced from: llvm-svn: 342599
* Implement LWG 2221 - No formatted output operator for nullptr. Reviewed as ↵Marshall Clow2018-09-191-0/+80
| | | | | | https://reviews.llvm.org/D44263 llvm-svn: 342566
* 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
* Remove unused include of "verbose_assert.h"Marshall Clow2018-09-191-1/+0
| | | | llvm-svn: 342524
* Mark LWG#3102 as complete. No code changes, but I updated a test or twoMarshall Clow2018-09-131-0/+6
| | | | llvm-svn: 342103
* Implement the infrastructure for feature-test macros. Very few actual ↵Marshall Clow2018-09-1240-0/+1486
| | | | | | feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 llvm-svn: 342073
* mark LWG#2953 as complete. No code changes required, but added a couple of ↵Marshall Clow2018-09-122-0/+64
| | | | | | extra tests. llvm-svn: 342070
* Update the failure annotations for the uncaught_exceptions test. The ↵Marshall Clow2018-09-121-5/+5
| | | | | | underlying abi library on some Mac OS versions does not support the plural uncaught_exceptions, so libc++ emulates it from the singlar; this means it will only return 0 or 1. llvm-svn: 342063
* Implement LWG #3017. list splice functions should use addressofMarshall Clow2018-09-122-0/+21
| | | | llvm-svn: 342057
* 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
* [libc++] Fix handling of negated character classes in regexLouis Dionne2018-08-242-1/+45
| | | | | | | | | | | | | | | | Summary: This commit fixes a regression introduced in r316095, where we don't match inverted character classes when there's no negated characrers in the []'s. rdar://problem/43060054 Reviewers: mclow.lists, timshen, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50534 llvm-svn: 340609
* [libc++] Remove race condition in std::asyncLouis Dionne2018-08-241-0/+58
| | | | | | | | | | | | | | | | | Summary: The state associated to the future was set in one thread (with synchronization) but read in another thread without synchronization, which led to a data race. https://bugs.llvm.org/show_bug.cgi?id=38181 rdar://problem/42548261 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D51170 llvm-svn: 340608
* Add diagnostics for min/max algorithms when a InputIterator is used.Eric Fiselier2018-08-221-0/+37
| | | | | | | | | | These algorithms require a ForwardIterator or better. Ensure we diagnose the contract violation at compile time instead of of silently doing the wrong thing. Further algorithms will be audited in upcoming patches. llvm-svn: 340426
* Fix Bug 38644: multimap::clear() missing exception specifier. Add noexcept ↵Marshall Clow2018-08-2212-11/+113
| | | | | | tests for all the containers that have clear(). llvm-svn: 340385
* [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallbackHubert Tong2018-08-161-0/+81
| | | | | | | | | | | | | | | | | | | | | | | Summary: When a seed sequence would lead to having no non-zero significant bits in the initial state of a `mersenne_twister_engine`, the fallback is to flip the most significant bit of the first value that appears in the textual representation of the initial state. rand.eng.mers describes this as setting the value to be 2 to the power of one less than w; the previous value encoded in the implementation, namely one less than "2 to the power of w", is replaced by the correct value in this patch. Reviewers: mclow.lists, EricWF, jasonliu Reviewed By: mclow.lists Subscribers: mclow.lists, jasonliu, EricWF, christof, ldionne, cfe-commits Differential Revision: https://reviews.llvm.org/D50736 llvm-svn: 339969
* Selectively import timespec_get into namespace std, since some C libraries ↵Marshall Clow2018-08-152-2/+2
| | | | | | don't have it. Reviewed as https://reviews.llvm.org/D50799 llvm-svn: 339816
* Mark the at_exit and at_quick_exit tests as unsupported under C++98 an 03, ↵Marshall Clow2018-08-153-2/+3
| | | | | | since those calls were introduced in C++11. They're already guarded by an ifdef in the code, so this is a 'belt-and-suspenders' change. llvm-svn: 339804
* [libcxx] Fix XFAILs for aligned allocation tests on older OSX versionsLouis Dionne2018-08-1515-96/+185
| | | | | | | | | | | | | | | | | Summary: Since r338934, Clang emits an error when aligned allocation functions are used in conjunction with a system libc++ dylib that does not support those functions. This causes some tests to fail when testing against older libc++ dylibs. This commit marks those tests as UNSUPPORTED, and also documents the various reasons for the tests being unsupported. Reviewers: vsapsai, EricWF Subscribers: christof, dexonsmith, cfe-commits, mclow.lists, EricWF Differential Revision: https://reviews.llvm.org/D50341 llvm-svn: 339743
* [libc++] Disable failing C11 feature tests for <cfloat> and <float.h>Louis Dionne2018-08-152-6/+6
| | | | | | | | | | | | | | Summary: Those tests are breaking the test bots. A Bugzilla has been filed to make sure those tests are re-enabled: https://bugs.llvm.org/show_bug.cgi?id=38572 Reviewers: mclow.lists, EricWF Subscribers: krytarowski, christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50748 llvm-svn: 339742
* [libc++] Add missing #include in C11 features testsLouis Dionne2018-08-142-0/+4
| | | | | | | | | | | | | | | | | | Summary: These #includes are quite important, since otherwise any #if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) checks are always false, and so we don't actually test for C11 support in the standard library. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50674 llvm-svn: 339675
* [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] Avoid -Wunused-local-typedef in node_handle.pass.cpp.Billy Robert O'Neal III2018-08-081-1/+3
| | | | llvm-svn: 339218
* [libcxx] [test] Allow a standard library that implements LWG 1203 in ↵Billy Robert O'Neal III2018-08-081-1/+1
| | | | | | | | istream.rvalue/rvalue.pass.cpp (Still pending review at https://reviews.llvm.org/D47400 which has been open since may; will ask for forgiveness rather than permission :) ) llvm-svn: 339214
* [libcxx] [test] Remove nonportable locale assumption in ↵Billy Robert O'Neal III2018-08-081-3/+3
| | | | | | | | | | basic.ios.members/narrow.pass.cpp I'm not sure if libcxx is asserting UTF-8 here; but on Windows the full char value is always passed through in its entirety, since the default codepage is something like Windows-1252. The replacement character is only used for non-chars there; and that should be a more portable test everywhere. (Still pending review at https://reviews.llvm.org/D47395 which has been open since may; will ask for forgiveness rather than permission :) ) llvm-svn: 339213
* [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-0817-0/+17
| | | | | | 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
* Update the changes to the array tests (that I committed yesterday) to use ↵Marshall Clow2018-08-031-55/+8
| | | | | | the test_comparison routines that I committed last week. NFC. llvm-svn: 338797
* Implement P1023: constexpr comparison operators for std::arrayMarshall Clow2018-08-021-0/+46
| | | | llvm-svn: 338668
* 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
* First half of C++17's splicing maps and setsErik Pilkington2018-08-0133-0/+2380
| | | | | | | | | | | | | This commit adds a node handle type, (located in __node_handle), and adds extract() and insert() members to all map and set types, as well as their implementations in __tree and __hash_table. The second half of this feature is adding merge() members, which splice nodes in bulk from one container into another. This will be committed in a follow-up. Differential revision: https://reviews.llvm.org/D46845 llvm-svn: 338472
OpenPOWER on IntegriCloud