summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* [test] Allow non-libc++ coroutine_handle::done to strengthen noexceptCasey Carter2017-06-014-6/+6
| | | | llvm-svn: 304487
* Mark two coroutine tests as unsupported under ubsanVedant Kumar2017-06-012-0/+6
| | | | | | | | | They appear to crash inside of SelectionDAG on some Linux bots, when ubsan is enabled. https://bugs.llvm.org/show_bug.cgi?id=33271 llvm-svn: 304462
* Remove ubsan XFAILS in two testsVedant Kumar2017-06-012-6/+0
| | | | | | | These two tests are ubsan-clean now: http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/3553/ llvm-svn: 304450
* Fix silly mistakes in recent changes made to coroutine testEric Fiselier2017-05-311-4/+2
| | | | llvm-svn: 304364
* Transform the libc++ coroutine shell tests into normal .pass.cpp tests.Eric Fiselier2017-05-3125-107/+15
| | | | | | | | | The shell test versions didn't get all of the flags normal tests do, specifically warning flags. This patch makes them .pass.cpp tests, and uses a lit.local.cfg to add -fcoroutines-ts and to make them UNSUPPORTED when that flag isn't available. llvm-svn: 304351
* [coroutines] Make coroutine_handle<T>::from_address ill-formed for ↵Eric Fiselier2017-05-292-0/+55
| | | | | | | | | | | | | everything but void*. from_address requires that the provided pointer refer to the suspended coroutine, which doesn't have a type, or at least not one knowable by the user. Therefore every use of `from_address` with a typed pointer is almost certainly a bug. This behavior is a part of the TS specification, but hopefully it will be in the future. llvm-svn: 304172
* Fix coroutine test failures caused by API misusages.Eric Fiselier2017-05-293-6/+6
| | | | | | | | More tests to come. I think that from_address overload should be deleted or ill-formed, except for the 'void*' one; The user cannot possibly have a typed pointer to the coroutine state. llvm-svn: 304131
* Correct XFAIL's in coroutine tests to only list ubsanEric Fiselier2017-05-282-9/+10
| | | | llvm-svn: 304106
* Fix use of uninitialized memoryEric Fiselier2017-05-281-1/+1
| | | | llvm-svn: 304105
* XFAIL tests which trigger coroutine debug info crash in ClangEric Fiselier2017-05-282-0/+8
| | | | llvm-svn: 304104
* Add hack to allow test to run w/o C++17 copy elisionEric Fiselier2017-05-281-2/+9
| | | | llvm-svn: 304103
* [coroutines] Add end-to-end tests within libc++Eric Fiselier2017-05-288-0/+809
| | | | | | | | | | | | | This patch adds end-to-end/breathing tests for coroutines into libc++. The tests aren't specifically to test libc++ requirements but instead are intented to ensure coroutines are working fine in general. Although libc++ isn't exactly the most correct place for these tests to live, there is one major advantage. The libc++ test suite is also used by MSVC and by adding the tests here it ensures they will be run against all currently available coroutine implementations. llvm-svn: 304101
* Remove incorrect #ifdef guards around variant tests.Eric Fiselier2017-05-262-4/+2
| | | | | | | | | | | The tests were previously guarded by #if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER), which is both incorrect (e.g. _LIBCPP_VERSION) and unneeded. Although the tests are technically non-standard (yet) they are supported by both libc++ and MSVC's STL. libstdc++ doesn't regularly use the test suite so I'm not concerned about guarding these tests for them. llvm-svn: 303953
* [test] Fix breakage from r303947 =(Casey Carter2017-05-261-2/+4
| | | | llvm-svn: 303951
* [test] make_shared<T()>(...) is, uh, libc++-specificCasey Carter2017-05-261-5/+13
| | | | llvm-svn: 303947
* Update more coroutine_handle signatures to reflect N4663.Eric Fiselier2017-05-253-10/+59
| | | | | | | Thanks to Casey Carter for pointing out the out-of-date tests and implementation. llvm-svn: 303900
* Add asserts that the nullptr is maintained in string erase operations.Billy Robert O'Neal III2017-05-254-0/+6
| | | | llvm-svn: 303899
* Update coroutine_handle<P>::promise to reflect N4663.Eric Fiselier2017-05-251-3/+3
| | | | | | | | | | | This patch updates the promise() member to match the current spec. Specifically it removes the non-const overload and make the return type of the const overload non-const. This patch also makes the ASSERT_NOT_NOEXCEPT tests libc++ specific, since other implementations may be free to strengthen the specification. llvm-svn: 303895
* [test] Workaround C1XX bug in uses_allocator_types.hppCasey Carter2017-05-251-1/+4
| | | | | | | | VSO#109062 "Explicit template argument specification with empty template parameter pack expansion does not imply further empty pack expansion" Differential Revision: https://reviews.llvm.org/D33214 llvm-svn: 303888
* Add support for shared_ptr<FunctionType>Erik Pilkington2017-05-251-1/+12
| | | | | | | | Fixes PR27566. Differential revision: https://reviews.llvm.org/D30837 llvm-svn: 303874
* Add <experimental/coroutine>Eric Fiselier2017-05-2517-0/+1002
| | | | | | | This patch adds the library portions of the coroutines PDTS, which should now be supported by Clang. llvm-svn: 303836
* Add non-parallel version of for_each_n (+tests) from the Parallelism TSMarshall Clow2017-05-251-0/+61
| | | | llvm-svn: 303833
* Add some constexpr tests for optional's move/copy ctorMarshall Clow2017-05-252-0/+27
| | | | llvm-svn: 303824
* Implement LWG#2790: Remove istreambuf_iterator::operator->. It never did ↵Marshall Clow2017-05-231-28/+0
| | | | | | anything useful. llvm-svn: 303675
* Make next/prev/advance/distance operations on iterators be constexpr. I ↵Marshall Clow2017-05-174-3/+116
| | | | | | missed this when I implemented the rest of P0031R0 llvm-svn: 303281
* Mark the copy constructor and move Marshall Clow2017-05-172-2/+12
| | | | | | constructor to be constexpr. This only works when the contained type has a constexpr copy/move ctor. llvm-svn: 303268
* [test] Add specific test for P0138R2, direct-list-init of fixed enums from ↵Casey Carter2017-05-121-0/+21
| | | | | | | | integers, part 3/3. Test the C++17 Core Language feature independently from other std::byte tests. llvm-svn: 302946
* [test] Avoid P0138R2, direct-list-init of fixed enums from integers, part 2/3.Casey Carter2017-05-1215-45/+0
| | | | | | | | | This C++17 Core Language feature isn't necessary when testing std::byte. It's a minor convenience, but it limits test coverage to very new compilers. This part activates the tests for more compilers. llvm-svn: 302945
* [test] Avoid P0138R2, direct-list-init of fixed enums from integers, part 1/3.Casey Carter2017-05-1215-34/+34
| | | | | | | | | | | This C++17 Core Language feature isn't necessary when testing std::byte. It's a minor convenience, but it limits test coverage to very new compilers. This part changes the code. Fixes D32386. llvm-svn: 302944
* Fix C++03 test failures caused by static_assert emulationEric Fiselier2017-05-123-6/+6
| | | | llvm-svn: 302871
* Cleanup test issues reported by STL @ Microsoft.Eric Fiselier2017-05-1210-1613/+1214
| | | | | | | | | | | This patch cleans up a number of issues reported by STL, including: 1) Fix duplicate is_convertible test. 2) Move non-standard reference_wrapper tests under test/libcxx 3) Fix assumption that sizeof(wchar_t) == 32 in the codecvt and wstring_convert tests. llvm-svn: 302870
* Remove non-standard basic_string_view::clear() member.Eric Fiselier2017-05-121-67/+0
| | | | | | | | This patch removes the clear() member from <string_view>. The modifier was removed from the TS before it ever landed in the standard. There is no reason libc++ should be providing this method. llvm-svn: 302869
* Move POSIX specific test under test/libcxx subdirectoryEric Fiselier2017-05-121-76/+0
| | | | llvm-svn: 302865
* Move tests for libc++ configurations into libcxx/ test subdirectoryEric Fiselier2017-05-123-32/+0
| | | | llvm-svn: 302864
* Fix or move tests with non-standard assumptionsEric Fiselier2017-05-124-131/+42
| | | | llvm-svn: 302862
* Guard usage of libc++ regex internals inside test.Eric Fiselier2017-05-121-23/+45
| | | | | | | | | This patch attempts to make lookup_classname.pass.cpp usable against other STL implementations by guarding the use of __regex_word. That being said it seems likely that the test is still non-conforming due to how libc++ handles the "w" character class. llvm-svn: 302859
* Fix XFAIL to reflect recent fixes in GCCEric Fiselier2017-05-111-1/+2
| | | | llvm-svn: 302841
* Mark LWG#2782 as complete. No functionality change; we already do this. Just ↵Marshall Clow2017-05-111-1/+7
| | | | | | added a few more tests. llvm-svn: 302802
* Mark LWG#2850 as complete. No functionality change; we had tests that ↵Marshall Clow2017-05-111-1/+2
| | | | | | covered it already. Just added comments to the tests. Thanks to K-ballo for the heads up. llvm-svn: 302799
* Mark LWG#2796 as complete. No functionality change; we had tests that ↵Marshall Clow2017-05-112-0/+8
| | | | | | covered it already. Just added comments to the tests llvm-svn: 302798
* Fix `std::visit` for the zero variants case.Michael Park2017-05-111-0/+10
| | | | | | | | | | | | | | | | | Summary: The following code is broken: ``` std::visit([]{}); ``` Reviewers: EricWF Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D33090 llvm-svn: 302773
* Remove usages of _LIBCPP_MSVC which is never definedEric Fiselier2017-05-101-1/+1
| | | | llvm-svn: 302736
* Implement LWG 2591 - Patch from K-BalloEric Fiselier2017-05-101-0/+4
| | | | llvm-svn: 302724
* XFAIL is_trivially_copyable test for compilers that don't implement Core 2094Eric Fiselier2017-05-101-1/+3
| | | | llvm-svn: 302723
* Fix enable_shared_from_this test in C++11Eric Fiselier2017-05-101-7/+6
| | | | llvm-svn: 302721
* Update is_trivially_copyable tests with CWG 2094Billy Robert O'Neal III2017-05-101-4/+4
| | | | | | | | | Clang 5.0 implements these changes here: https://github.com/llvm-mirror/clang/commit/87cd035326a39523eeb1b295ad36cff337141ef9 MSVC++ will implement these changes in the first toolset update to 2017. Differential Revision: https://reviews.llvm.org/D33021 llvm-svn: 302710
* [libc++] Fix PR32979 - types with a private std::enable_shared_from_this ↵Eric Fiselier2017-05-101-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | base break shared_ptr Summary: This patch fixes bugs.llvm.org/PR32979. [util.smartptr.shared.const] says: > In the constructor definitions below, enables shared_from_this with p, for a pointer p of type Y*, means > that if Y has an unambiguous and accessible base class that is a specialization of enable_shared_from_- > this. This means that libc++ needs to respect the access specifier of the base class, and not attempt to construct and enabled_shared_from_this base if it is private. However access specifiers don't affect overload resolution so our current implementation will attempt to construct the private base. This patch uses SFINAE to correctly detect if the shared_ptr input has an accessible enable_shared_from_this base class. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33033 llvm-svn: 302709
* Fix GCC 7 test failures.Eric Fiselier2017-05-0911-10/+18
| | | | | | | | | | | This patch fixes the test failures and unexpected passes that occur when testing against GCC 7. Specifically: * don't mark __gcd as always inline because it's a recursive function. GCC diagnoses this. * don't XFAIL the aligned allocation tests. GCC 7 supports them but not the -faligned-allocation option. * Work around gcc.gnu.org/PR78489 in variants constructors. llvm-svn: 302488
* Fix possible loss of data warnings on amd64Billy Robert O'Neal III2017-05-081-8/+10
| | | | | | | | | | | | | In T_size_size.pass, there is an explicit template argument to std::min to ask for unsigned, to avoid type deduction errors. However, C1XX' warnings still hate this use, because a 64 bit value (a size_t) is being passed to a function accepting an unsigned (a 32 bit value). Instead, change the tests to pass around std::size_t instances, and explicitly narrow when constructing the string type under test. This also allows removal of explicit template arguments to std::min. llvm-svn: 302473
* Resolve integer overflow warnings in GCD and LCM testsBilly Robert O'Neal III2017-05-082-42/+52
| | | | | | | | | | | | | | | | | | | | | lcm.pass.cpp: 19: Update headers to that actually used in the test. 41: test0 was triggering narrowing warnings for all callers, because the inputs were always ints, but some of the explicit template arguments were smaller than that. Instead, have this function accept ints and static_cast explicitly to the types we want before calling std::lcm. 47: Replace unnecessary ternary. 55: Use foo_t instead of typename foo<>::type 111/116: intX_t were not std::qualified but only <cfoo> headers were included. 141: C1XX has a bug where it interprets 2147483648 as unsigned int. Then the negation trips "negation of unsigned value, result still unsigned" warnings. Perma-workaround this issue by saying INT_MIN, which better documents the intended behavior and avoids triggering warnings on C1XX. gcd.pass.cpp: Same changes as lcm.pass.cpp but for GCD. llvm-svn: 302472
OpenPOWER on IntegriCloud