summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
* [optional] Update synopsis for LWG2934Casey Carter2017-04-1712-18/+18
| | | | | | (comment-only change) llvm-svn: 300488
* Sigh. Once again forgot about the 'no exceptions' bots.Marshall Clow2017-04-172-0/+8
| | | | llvm-svn: 300451
* Mark LWG#2853 as complete. No code changes required, but added a couple of ↵Marshall Clow2017-04-172-0/+48
| | | | | | extra tests llvm-svn: 300449
* Cleanup one more <forward_list> testEric Fiselier2017-04-162-35/+5
| | | | llvm-svn: 300417
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <forward_list>Eric Fiselier2017-04-1611-45/+21
| | | | llvm-svn: 300415
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <list>Eric Fiselier2017-04-169-36/+18
| | | | llvm-svn: 300414
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in dequeEric Fiselier2017-04-1610-42/+20
| | | | llvm-svn: 300413
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <array>Eric Fiselier2017-04-161-1/+3
| | | | llvm-svn: 300412
* Workaround Clang bug regarding template template parametersEric Fiselier2017-04-161-5/+11
| | | | llvm-svn: 300411
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in vector.Eric Fiselier2017-04-1619-81/+43
| | | | | | | | | | | | | This patch cleans up all usages of the following feature test macros inside <vector> and its tests: * _LIBCPP_HAS_NO_RVALUE_REFERENCES * _LIBCPP_HAS_NO_VARIADICS * _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS Where needed the above guards were replaced with _LIBCPP_CXX03_LANG. llvm-svn: 300410
* Overhaul unique_ptr - Implement LWG 2801, 2905, 2520.Eric Fiselier2017-04-1617-75/+750
| | | | | | | | | | | | | | | | | | | | | This patch overhauls both specializations of unique_ptr while implementing the following LWG issues: * LWG 2801 - This issue constrains unique_ptr's constructors when the deleter type is not default constructible. Additionally it adds SFINAE conditions to unique_ptr<T[]>::unique_ptr(Up). * LWG 2905 - This issue reworks the unique_ptr(pointer, /* see below */ deleter) constructors so that they correctly SFINAE when the deleter argument cannot be used to construct the stored deleter. * LWG 2520 - This issue fixes initializing unique_ptr<T[]> from nullptr. Libc++ had previously implemented this issue, but the suggested resolution still broke initialization from NULL. This patch re-works the unique_ptr<T[]>(Up, deleter) overloads so that they accept NULL as well as nullptr. llvm-svn: 300406
* Implement LWG 2857 for variant. Tests from Casey Carter @ Microsoft.Eric Fiselier2017-04-154-30/+83
| | | | | | | Also mark LWG 2857 as complete, since the changes to optional and any were completed by Marshall earlier. llvm-svn: 300403
* Simplify test helperEric Fiselier2017-04-151-7/+1
| | | | llvm-svn: 300399
* Fix PR32642 - string::insert and string::append don't work with move_iterator.Eric Fiselier2017-04-152-4/+45
| | | | llvm-svn: 300397
* Rewrite and cleanup unique_ptr tests.Eric Fiselier2017-04-15173-6899/+2380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch almost entirely rewrites the unique_ptr tests. There are a couple of reasons for this: A) Most of the *.fail.cpp tests were either incorrect or could be better written as a *.pass.cpp test that uses <type_traits> to check if certain operations are valid (Ex. Using static_assert(!std::is_copy_constructible_v<T>) instead of writing a failure test). B) [unique.ptr.runtime] has very poor test coverage. Many of the constructors and assignment operators have to tests at all. The special members that have tests have very few test cases and are typically way out of date. C) The tests for [unique.ptr.single] and [unique.ptr.runtime] are largely duplicates of each other. This means common requirements have two different sets of tests in two different test files. This makes the tests harder to maintain than if there was a single copy. To address (A) this patch changes almost all of the *.fail.cpp tests into .pass.cpp tests using type traits; Allowing the *.fail.cpp tests to be removed. The address (B) and (C) the tests for [unique.ptr.single] and [unique.ptr.runtime] have been combined into a single directory, allowing both specializations to share common tests. Tests specific to the single/runtime specializations are given the suffix "*.single.pass.cpp" or "*.runtime.pass.cpp". Finally the unique.ptr test have been moved into the correct directory according to the standard. Specifically they have been removed from "utilities/memory" into "utilities/smartptr". PS. This patch also adds newly written tests for upcoming unique_ptr changes/fixes. However since these tests don't currently pass they are guarded by the macro TEST_WORKAROUND_UPCOMING_UNIQUE_PTR_CHANGES. This allows other STL's to validate the tests before libc++ implements the changes. The relevant libc++ changes should land in the next week. llvm-svn: 300388
* Remove the binders from C++17. Reviewed as https://reviews.llvm.org/D31769Marshall Clow2017-04-1345-0/+721
| | | | llvm-svn: 300232
* Implement LWG#2855 - made easy by previous refactoringMarshall Clow2017-04-131-0/+10
| | | | llvm-svn: 300218
* Add TEST_NOEXCEPT_FALSE to support D31738Eric Fiselier2017-04-131-0/+2
| | | | llvm-svn: 300191
* Cleanup any_cast failure testEric Fiselier2017-04-131-8/+25
| | | | llvm-svn: 300175
* Fix template >> within C++03 codeEric Fiselier2017-04-131-1/+1
| | | | llvm-svn: 300165
* Diagnose when reverse_iterator is used on path::iterator.Eric Fiselier2017-04-132-7/+36
| | | | | | | | | | | | | | | path::iterator isn't a strictly conforming iterator. Specifically it stashes the current element inside the iterator. This leads to UB when used with reverse_iterator since it requires the element to outlive the lifetime of the iterator. This patch adds a static_assert inside reverse_iterator to disallow "stashing iterator types", and it tags path::iterator as such a type. Additionally this patch removes all uses of reverse_iterator<path::iterator> within the tests. llvm-svn: 300164
* Fix C++03 test failuresEric Fiselier2017-04-132-2/+2
| | | | llvm-svn: 300159
* Add tests that std::unique_ptr's default constructor is constexpr.Eric Fiselier2017-04-133-49/+50
| | | | | | | | | | | | std::unique_ptr's default constructor must be constexpr in order to allow constant initialization to take place for static objects; Even though we can never have a constexpr unique_ptr variable since it's not a literal type. This patch adds tests that constant initialization takes place by using the __attribute__((require_constant_initialization)) macro. llvm-svn: 300158
* Update tests -verify error messages after r300140.Eric Fiselier2017-04-131-1/+1
| | | | llvm-svn: 300156
* Fix most failures caused by r300140Eric Fiselier2017-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | r300140 introduced a bunch of failures by changing the internal interface provided by __compressed_pair. This patch fixes all of the failures caused by the new interface by changing the existing code to use it. In addition to those changes this patch also fixes two separate issues causing test failures: 1) Fix the member swap definition for __map_value_compare. Previously the swap was incorrectly configured to swap the comparator as const. 2) Fix an assertion failure in futures.task.members/ctor_func_alloc.pass.cpp that incorrectly expected a move to take place when a single copy is sufficient. There is one remaining failure regarding make_shared. I'll commit a fix for that shortly. llvm-svn: 300148
* [libcxx] Fix __compressed_pair so it doesn't copy the argument multiple ↵Eric Fiselier2017-04-121-13/+14
| | | | | | | | | | | | | | | | | | | | | times, and add constexpr. Summary: __compressed_pair takes and passes it's constructor arguments by value. This causes arguments to be moved 3 times instead of once. This patch addresses that issue and fixes `constexpr` on the constructors. I would rather have this fix than D27564, and I'm fairly confident it's not ABI breaking but I'm not 100% sure. I prefer this solution because it removes a lot of code and makes the implementation *much* smaller. Reviewers: mclow.lists, K-ballo Reviewed By: K-ballo Subscribers: K-ballo, cfe-commits Differential Revision: https://reviews.llvm.org/D27565 llvm-svn: 300140
* Fix test failures with older Clang versionsEric Fiselier2017-04-122-0/+4
| | | | llvm-svn: 300132
* [libc++] Implement LWG 2911 - add an is_aggregate type-traitEric Fiselier2017-04-122-0/+107
| | | | | | | | | | | | | | | | | Summary: This patch implements http://cplusplus.github.io/LWG/lwg-defects.html#2911. I'm putting this up for review until __is_aggregate is added to clang (See D31513) Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31515 llvm-svn: 300126
* Additional test file for r300123Marshall Clow2017-04-121-17/+47
| | | | llvm-svn: 300124
* Implement part of LWG#2857 - any/optional. Still to do - variant. Reviewed ↵Marshall Clow2017-04-121-9/+27
| | | | | | as https://reviews.llvm.org/D31956 llvm-svn: 300123
* Fix incorrectly qualified return type from unique_ptr::get_deleter().Eric Fiselier2017-04-123-23/+61
| | | | | | | | | | | For reference deleter types the const qualifier on the return type of get_deleter() should be ignored, and a non-const deleter should be returned. This patch fixes a bug where "const deleter_type&" is incorrectly formed. llvm-svn: 300121
* [libcxx] [test] Avoid Clang's -Wunused-const-variable in ↵Stephan T. Lavavej2017-04-121-0/+1
| | | | | | | | | | is_constructible.pass.cpp. This happens when using Clang with MSVC's STL, so there are no actual uses of this variable. Fixes D31966. llvm-svn: 300079
* Add some FAIL constexpr tests for optional's copy/move ctors.Marshall Clow2017-04-122-0/+73
| | | | llvm-svn: 300009
* Implement LWG#2873: 'Add noexcept to several shared_ptr related functions' ↵Marshall Clow2017-04-115-15/+35
| | | | | | This issue missed a couple, so I added those as well (see LWG#2942) llvm-svn: 299963
* Fix a C++03 failureMarshall Clow2017-04-111-3/+3
| | | | llvm-svn: 299909
* Remove some trigraphs that GCC was complaining aboutMarshall Clow2017-04-111-2/+2
| | | | llvm-svn: 299907
* Fix PR#32605: common_type<T> is not SFINAE-friendlyMarshall Clow2017-04-101-1/+5
| | | | llvm-svn: 299901
* Fix PR#32606: std::decay mishandles abominable function typesMarshall Clow2017-04-101-0/+6
| | | | llvm-svn: 299894
* Revert "Allow a standard library to implement conditional noexcept for ↵Akira Hatanaka2017-04-072-11/+4
| | | | | | | | optional and unique_ptr hash functions." This reverts commit r299734. llvm-svn: 299744
* Add noexcept(false) to more strongly indicate that not being noexcept is ↵Billy Robert O'Neal III2017-04-062-2/+2
| | | | | | important for hash tests. llvm-svn: 299735
* Allow a standard library to implement conditional noexcept for optional and ↵Billy Robert O'Neal III2017-04-062-4/+11
| | | | | | | | | | unique_ptr hash functions. These tests were unconditionally asserting that optional and unique_ptr declare throwing hashes, but MSVC++ implements conditional noexcept forwarding that of the underlying hash function. As a result we were failing these tests but there's nothing forbidding strengthening noexcept in that way. Changed the ASSERT_NOT_NOEXCEPT asserts to use types which themselves have non-noexcept hash functions. llvm-svn: 299734
* Some of Eric's buildbots don't like this test. Disable it while I figure out ↵Marshall Clow2017-04-061-0/+2
| | | | | | why. llvm-svn: 299686
* Recommit awk tests with warnings removed. Initial commit r299652, reverted ↵Marshall Clow2017-04-061-48/+47
| | | | | | r299656. llvm-svn: 299680
* Revert "Restore Missing awk regex tests. Thanks to dexonsmith for noticing, ↵Mehdi Amini2017-04-061-8/+9
| | | | | | | | and proposing this as https://reviews.llvm.org/D16541" This reverts commit r299652, 32bits MacOS is broken. llvm-svn: 299656
* Restore Missing awk regex tests. Thanks to dexonsmith for noticing, and ↵Marshall Clow2017-04-061-9/+8
| | | | | | proposing this as https://reviews.llvm.org/D16541 llvm-svn: 299652
* Fix more -Wshadow warnings introduced by recent Clang changeEric Fiselier2017-04-046-7/+0
| | | | llvm-svn: 299411
* Fix LWG 2934 - optional<const T> doesn't compare with TEric Fiselier2017-03-3012-400/+534
| | | | llvm-svn: 299105
* Implement LWG 2842 - optional(U&&) needs to SFINAE on decay_t<in_place_t>Eric Fiselier2017-03-301-0/+14
| | | | llvm-svn: 299100
* Mark *pass tests as UNUSUPPORTED instead of XFAIL on old compilersMarshall Clow2017-03-2712-24/+24
| | | | llvm-svn: 298839
* Mark *fail tests as UNUSUPPORTED instead of XFAIL on old compilersMarshall Clow2017-03-275-10/+10
| | | | llvm-svn: 298832
OpenPOWER on IntegriCloud