summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix up typos in a couple of tests; due to agressive short-circuiting, they ↵Marshall Clow2015-07-182-2/+10
| | | | | | never failed on clang or gcc, but MSVC whined. Patch by Andrew Parker. llvm-svn: 242618
* Add missing instrumentation in vector::insert - Patch from Anna ZaksEric Fiselier2015-07-182-4/+18
| | | | | | This patch was reviewed as D10859. http://reviews.llvm.org/D10859 llvm-svn: 242617
* [libcxx] Get is_*_destructible tests passing in C++03.Eric Fiselier2015-07-183-38/+73
| | | | | | | | | | | | Summary: This patch adds proper guards to the is_destructible tests depending on the standard version so that they pass in c++03. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10047 llvm-svn: 242612
* Cleanup tests that fail in C++1z and with Clang 3.8Eric Fiselier2015-07-179-377/+248
| | | | llvm-svn: 242581
* Include what we use, instead of letting them get pulled in implictly. This ↵Marshall Clow2015-07-163-0/+5
| | | | | | makes the tests work on VS. Thanks to STL for the report llvm-svn: 242454
* Make sure that __libcpp_compressed_pair_imp default-constructs its' members, ↵Marshall Clow2015-07-161-0/+16
| | | | | | rather than value-initializing them. Fixes PR#24137 llvm-svn: 242377
* Mark two tests as failing on clang 3.8 (they failed on 3.7, too)Marshall Clow2015-07-162-4/+4
| | | | llvm-svn: 242375
* Remove non-ascii charactersEric Fiselier2015-07-141-5/+5
| | | | llvm-svn: 242197
* Implement n4169 - Add invoke function templateEric Fiselier2015-07-141-0/+268
| | | | llvm-svn: 242195
* Fix PR24114 - std::atomic for non-Clang is not a literal typeEric Fiselier2015-07-141-0/+56
| | | | | | Add _LIBCPP_CONSTEXPR to the implementation of __gcc_atomic_t. llvm-svn: 242172
* Move bits from N4258. Mark vector's move-constructor unconditionally ↵Marshall Clow2015-07-142-0/+10
| | | | | | noexcept in C++1z llvm-svn: 242148
* Implement the first part of N4258: 'Cleaning up noexcept in the Library'. ↵Marshall Clow2015-07-1314-12/+1048
| | | | | | This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates. llvm-svn: 242056
* [libcxx] LWG2420 bits for bind<void> - Patch from K-BalloEric Fiselier2015-07-101-3/+16
| | | | | | | Implemented LWG2420 bits for bind<void> Review: http://reviews.llvm.org/D10997 llvm-svn: 241967
* Fix error string in test suiteEric Fiselier2015-07-081-1/+1
| | | | llvm-svn: 241757
* The rest of N4279 and LWG#2464 - for unordered_mapMarshall Clow2015-07-072-0/+393
| | | | llvm-svn: 241555
* Implement N4279 and LWG#2664 for <map>. Reviewed as ↵Marshall Clow2015-07-072-0/+381
| | | | | | http://reviews.llvm.org/D10669 llvm-svn: 241539
* [libcxx] Add atomic_support.h header to src that handles needed atomic ↵Eric Fiselier2015-07-071-0/+94
| | | | | | | | | | | | | | | | | | | | | operations. Summary: In some places in libc++ we need to use the `__atomic_*` builtins. This patch adds a header that provides access to those builtins in a uniform way from within the dylib source. If the compiler building the dylib does not support these builtins then a warning is issued. Only relaxed loads are needed within the headers. A singe function to do these relaxed loads has been added to `<memory>`. This patch applies the new atomic builtins to `__shared_count` and `call_once`. Reviewers: mclow.lists Subscribers: majnemer, jroelofs, cfe-commits Differential Revision: http://reviews.llvm.org/D10406 llvm-svn: 241532
* Automatically detect and use clang verify in failure tests.Eric Fiselier2015-07-064-11/+19
| | | | | | | | | Automatically enable clang verify whenever the '-verify-ignore-unexpected' flag is supported. Failure tests are run using verify if they contain one or more "expected-*" diagnostics tags. Otherwise they are run normally. llvm-svn: 241492
* Noticed that std::allocator<const T> was missing the definition for ↵Marshall Clow2015-07-012-0/+9
| | | | | | is_always_equal. Fixed this, and added a test for it. llvm-svn: 241190
* Forgot the support include file in r241091Marshall Clow2015-06-301-0/+73
| | | | llvm-svn: 241092
* Add tests for LWG#2299. While doing so, I noticed that the tests we have for ↵Marshall Clow2015-06-3049-1/+1716
| | | | | | the transparent comparators don't actually call them. Fix those tests, too. Now one of them is failing, due to a missing const in <map>. Add that (twice). Next step is to do the same for <unordered_map> llvm-svn: 241091
* Implement LWG#2407: 'packaged_task(allocator_arg_t, const Allocator&, F&&) ↵Marshall Clow2015-06-301-1/+1
| | | | | | should neither be constrained nor explicit' llvm-svn: 241068
* Implement N4508: shared_mutex. Reviewed as http://reviews.llvm.org/D10480Marshall Clow2015-06-308-0/+327
| | | | llvm-svn: 241067
* Make support for thread-unsafe C functions optional.Ed Schouten2015-06-2413-3/+104
| | | | | | | | | | | | | | | | | | | | | | | | One of the aspects of CloudABI is that it aims to help you write code that is thread-safe out of the box. This is very important if you want to write libraries that are easy to reuse. For CloudABI we decided to not provide the thread-unsafe functions. So far this is working out pretty well, as thread-unsafety issues are detected really early on. The following patch adds a knob to libc++, _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable thread-unsafe functions that can easily be avoided in practice. The following functions are not thread-safe: - <clocale>: locale handles should be preferred over setlocale(). - <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over their non-restartable counterparts. - <ctime>: asctime(), ctime(), gmtime() and localtime() are not thread-safe. The first two are also deprecated by POSIX. Differential Revision: http://reviews.llvm.org/D8703 Reviewed by: marshall llvm-svn: 240527
* Make seeking on an ostream that has eofbit set work correctly. Fixes PR#21361Marshall Clow2015-06-222-0/+22
| | | | llvm-svn: 240286
* Fix PR#18843. Thanks to Howard for the fixMarshall Clow2015-06-191-0/+4
| | | | llvm-svn: 240136
* Fix std::function allocator constructors in C++03.Eric Fiselier2015-06-144-125/+212
| | | | | | | | | The C++03 version of function tried to default construct the allocator in the uses allocator constructors when no allocation was performed. These constructors would fail to compile when used with allocators that had no default constructor. llvm-svn: 239708
* Cleanup result_of tests and fix issues with the C++03 result_of.Eric Fiselier2015-06-132-61/+306
| | | | | | | | | | The two main fixes this patch contains are: - use __identity_t instead of common_type. common_type was used as an identity metafunction but the decay resulted in incorrect results. - Pointers to free functions were not counted as functions. Remove the pointer before checking if a type is a function. llvm-svn: 239668
* Fix PR12999 - unordered_set::insert calls operator new when no insert occursEric Fiselier2015-06-131-0/+48
| | | | | | | | | | | | | | | | | | | | | | | Summary: when `unordered_set::insert(value_type&&)` was called it would be treated like `unordered_set::emplace(Args&&)` and it would allocate and construct a node before trying to insert it. This caused unnecessary allocations when the value was already in the set. This patch adds an overload to `__hash_table::__insert_unique` that specifically handles `value_type&&` more link `value_type const &`. This patch also adds a single unified insert function for values into `__hash_table` called `__insert_unique_value` that handles the cases for `__insert_unique(value_type&&)` and `__insert_unique(value_type const &)`. This patch fixes PR12999: http://llvm.org/bugs/show_bug.cgi?id=12999. Reviewers: mclow.lists, titus, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7570 llvm-svn: 239666
* LWG2442: call_once() shouldn't DECAY_COPY(). Patch from K-Ballo.Eric Fiselier2015-06-131-1/+47
| | | | | | | This patch fixes LWG issue 2422 by removing the DECAY_COPY from call once. The review can be found here: http://reviews.llvm.org/D10191 llvm-svn: 239654
* Refactor is_member_function_pointer to use is_function and not ↵Eric Fiselier2015-06-131-13/+47
| | | | | | | | | | __member_function_traits. Replacing the dependancy on __member_function_traits with is_function allows is_member_function_pointer to work more often. In particular it allows it to work when we don't have variadic templates but the function has an arity > 3. llvm-svn: 239649
* Fix PR23293 - Do not unlock shared state before notifying consumers.Eric Fiselier2015-06-121-0/+67
| | | | | | | | Within the shared state methods do not unlock the lock guards manually. This could cause a race condition where the shared state is destroyed before the method is complete. llvm-svn: 239577
* Change #ifdefs in test to UNSUPPORTED. No functionality change in the testsMarshall Clow2015-06-119-48/+10
| | | | llvm-svn: 239562
* Fix PR#23767. Add tests for iterator invalidation for ↵Marshall Clow2015-06-054-0/+246
| | | | | | deque::erase/pop_front/pop_back llvm-svn: 239196
* While applying N4258, I forgot about LWG#2455, which modified the ↵Marshall Clow2015-06-044-25/+1
| | | | | | modifications. Correct those - h/t: Howard llvm-svn: 239004
* More N4258 changes. This time vector's constructorsMarshall Clow2015-06-044-5/+48
| | | | llvm-svn: 238990
* More of N4258 implementation. Mark all of our test_allocators as noexcept ↵Marshall Clow2015-06-037-27/+86
| | | | | | constructible. Make the constructors for basic_string noexcept all the time (under C++14). Update tests to reflect the new world order. More to come. llvm-svn: 238957
* Add 'is_always_equal' tests for scoped_allocator. Found that I had typed ↵Marshall Clow2015-06-031-0/+75
| | | | | | '||' where I meant '&&' in the code; fixed that, too llvm-svn: 238931
* Implement the first part of N4258 - allocator_traits<X>::is_always_equal. ↵Marshall Clow2015-06-021-0/+48
| | | | | | Also fixes PR#23723 llvm-svn: 238848
* Implement uncaught_exceptions() using the newly added hooks in libc++abi, ↵Marshall Clow2015-06-021-0/+45
| | | | | | when available llvm-svn: 238846
* Add TODO items and remove use of 'noexcept' in C++03 test.Eric Fiselier2015-06-021-1/+1
| | | | llvm-svn: 238802
* Fix PR#23647 - make_shared<volatile bool> - second tryMarshall Clow2015-05-271-3/+3
| | | | llvm-svn: 238370
* Revert 238354 while I figure out what broke in weak_ptrMarshall Clow2015-05-271-3/+3
| | | | llvm-svn: 238355
* Fix PR#23647 - make_shared<volatile bool>Marshall Clow2015-05-271-0/+61
| | | | llvm-svn: 238354
* Get thread sleep_for test passing in C++03Eric Fiselier2015-05-271-2/+5
| | | | llvm-svn: 238273
* Mark __convert_to_integral test as XFAIL in c++03Eric Fiselier2015-05-271-0/+3
| | | | llvm-svn: 238271
* Cleanup move/forward tests and remove references to __rv.Eric Fiselier2015-05-273-30/+15
| | | | llvm-svn: 238270
* Add test macros header to remove dependance on __config macros.Eric Fiselier2015-05-272-0/+141
| | | | llvm-svn: 238267
* Fix broken test I just addedMarshall Clow2015-05-261-3/+3
| | | | llvm-svn: 238234
* Add tests to ensure that string/vector/array have contiguous iterators - ↵Marshall Clow2015-05-263-0/+124
| | | | | | which they did. Mark N4284 as complete llvm-svn: 238233
OpenPOWER on IntegriCloud