summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Get <experimental/coroutine> working in C++03.Eric Fiselier2017-05-262-33/+94
| | | | | | | | | | | | | Clang supports coroutines in all dialects; Therefore libc++ should too, otherwise the Clang extension is unusable. I'm not convinced extending support to C++03 is a feasible long term plan, since as the library grows to offer things like generators it will be come increasingly difficult to limit the implementation to C++03. However for the time being supporting C++03 isn't a big deal. llvm-svn: 303963
* Guard <experimental/coroutine> against older Clang versions.Eric Fiselier2017-05-262-5/+9
| | | | | | | | | | | | | | Clang started providing -fcoroutines and defining __cpp_coroutines way before it implemented the __builtin_coro_foo functions. This means that simply checking if __cpp_coroutines is not a sufficient way of detecting the actual feature. This patch implements _LIBCPP_HAS_NO_COROUTINES which implements a slightly more complex feature check. Specifically it requires __cpp_coroutines >= 201703L, which only holds for Clang 5.0 built after 2017/05/24. llvm-svn: 303956
* 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
* Re-add <experimental/coroutine> to the module map.Eric Fiselier2017-05-252-9/+7
| | | | | | | | | | | | | The original issues were caused because <experimental/coroutine> didn't correctly #ifdef out enough of the header, which caused incomplete types to be used. This patch fixes the `#if defined(__cpp_coroutines)` guard and re-adds the headers to the module map. It also uglifies some incorrectly non-reserved names. llvm-svn: 303936
* Correct typo: LIBCXXABI_BUILTINS_LIBRARY -> LIBCXX_BUILTINS_LIBRARYEric Fiselier2017-05-251-1/+1
| | | | llvm-svn: 303929
* libcxx: fix bootstrapping for mingw-w64Martell Malone2017-05-253-7/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D33388 llvm-svn: 303928
* Update more coroutine_handle signatures to reflect N4663.Eric Fiselier2017-05-254-13/+62
| | | | | | | 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-252-11/+5
| | | | | | | | | | | 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] Remove workaround for C1XX conversion-to-nullptr bugCasey Carter2017-05-253-36/+4
| | | | | | | | | | VSO#391542 "Types can't be convertible to nullptr_t" Also put internal bug numbers on the workarounds in test_workarounds.h for correlation. Differential Revision: https://reviews.llvm.org/D33290 llvm-svn: 303889
* [test] Workaround C1XX bug in uses_allocator_types.hppCasey Carter2017-05-254-1/+62
| | | | | | | | 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
* Fix a test that was failing in C++11 mode introduced in r303874Erik Pilkington2017-05-251-1/+5
| | | | llvm-svn: 303878
* Mark LWG#2900 as complete - we already do this, and I checked the tests in a ↵Marshall Clow2017-05-251-2/+2
| | | | | | couple days ago (r303268 & r303824) llvm-svn: 303876
* Add support for shared_ptr<FunctionType>Erik Pilkington2017-05-253-13/+93
| | | | | | | | Fixes PR27566. Differential revision: https://reviews.llvm.org/D30837 llvm-svn: 303874
* Last commit included some extra constexpr; remove themMarshall Clow2017-05-251-3/+3
| | | | llvm-svn: 303862
* Make for_each_n only avaliable on C++17Marshall Clow2017-05-251-3/+5
| | | | llvm-svn: 303856
* Remove <experimental/coroutine> from the module map for now. It doesn't work ↵Eric Fiselier2017-05-251-4/+6
| | | | | | unless modules are enabled llvm-svn: 303838
* Disable the coroutines tests until Clang bumps __cpp_coroutines to reflect ↵Eric Fiselier2017-05-251-1/+9
| | | | | | recent changes llvm-svn: 303837
* Add <experimental/coroutine>Eric Fiselier2017-05-2525-0/+1317
| | | | | | | This patch adds the library portions of the coroutines PDTS, which should now be supported by Clang. llvm-svn: 303836
* Fix broken links on C++1z status pageEric Fiselier2017-05-251-5/+5
| | | | llvm-svn: 303835
* Add non-parallel version of for_each_n (+tests) from the Parallelism TSMarshall Clow2017-05-252-0/+82
| | | | 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-233-31/+2
| | | | | | anything useful. llvm-svn: 303675
* [test] Add support for Objective-C++ testsErik Pilkington2017-05-197-4/+87
| | | | | | Differential revision: https://reviews.llvm.org/D33049 llvm-svn: 303466
* Make next/prev/advance/distance operations on iterators be constexpr. I ↵Marshall Clow2017-05-176-81/+203
| | | | | | missed this when I implemented the rest of P0031R0 llvm-svn: 303281
* Mark the copy constructor and move Marshall Clow2017-05-173-4/+14
| | | | | | 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-1455/+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-122-75/+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-0/+0
| | | | llvm-svn: 302865
* Move tests for libc++ configurations into libcxx/ test subdirectoryEric Fiselier2017-05-123-2/+4
| | | | llvm-svn: 302864
* Fix or move tests with non-standard assumptionsEric Fiselier2017-05-125-16/+74
| | | | 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-112-2/+8
| | | | | | added a few more tests. llvm-svn: 302802
* Replace a nested namespace used for overload resolution with a struct. ↵Marshall Clow2017-05-111-2/+2
| | | | | | Richard Smith says that using the namespace results in an ODR violation, but I disagree. Nevertheless, the struct works just as well. llvm-svn: 302800
* Mark LWG#2850 as complete. No functionality change; we had tests that ↵Marshall Clow2017-05-112-2/+3
| | | | | | 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-113-2/+10
| | | | | | covered it already. Just added comments to the tests llvm-svn: 302798
* Fix `std::visit` for the zero variants case.Michael Park2017-05-112-16/+17
| | | | | | | | | | | | | | | | | Summary: The following code is broken: ``` std::visit([]{}); ``` Reviewers: EricWF Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D33090 llvm-svn: 302773
* Workaround -W#warnings on Windows until the correct fixes can landEric Fiselier2017-05-101-0/+3
| | | | llvm-svn: 302743
* Remove usages of _LIBCPP_MSVC which is never definedEric Fiselier2017-05-107-8/+8
| | | | llvm-svn: 302736
* Fix MinGW build to use Pthread when the header is available.Eric Fiselier2017-05-101-1/+8
| | | | | | | | | | | | | Some MinGW configurations use WinPThread instead of the native threading interfaces. When this happens libc++ doesn't build because it tries to use the wrong threading API. This patch attempts to correctly detect and enable pthreads; Selecting them when __MINGW32__ is defined and __has_include(<pthread.h>) is true. I'm not sure if this works correctly 100% of the time but it seemed like the most correct approach available. llvm-svn: 302734
* Don't interfere with the __builtin_foo namespace under MSVCEric Fiselier2017-05-102-178/+103
| | | | | | | | | This patch follows up on feedback received in the review for D32988. Specifically that libc++ should not mess with the __builtin namespace, and that libc++ should use __popcnt to implement __pop_count under MSVC. llvm-svn: 302731
* Fix bad #endif in msvc_stdlib_force_include.hpp.Billy Robert O'Neal III2017-05-101-6/+7
| | | | llvm-svn: 302728
* [libc++] Refactor Windows support headers.Eric Fiselier2017-05-1014-114/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch refactors and tries to remove as much of the Windows support headers as possible. This is needed because they currently introduce super weird include cycles and dependencies between STL and libc headers. The changes in this patch are: * remove `support/win32/support.h` completely. The required parts have either been moved into `support/win32/msvc_support.h` (for `MSVC` only helpers not needed by Clang), or directly into their respective `foo.h` headers. * Combine `locale_win32.h` and `locale_mgmt_win32.h` into a single headers, this header should only be included within `__locale` or `locale` to avoid include cycles. * Remove the unneeded parts of `limits_win32.h` and re-name it to `limits_msvc_win32.h` since it's only needed by Clang. I've tested this patch using Clang on Windows, but I suspect it might technically regress our non-existent support for MSVC. Is somebody able to double check? This refactor is needed to support upcoming fixes to `<locale>` on Windows. Reviewers: bcraig, rmaprath, compnerd, EricWF Reviewed By: EricWF Subscribers: majnemer, cfe-commits Differential Revision: https://reviews.llvm.org/D32988 llvm-svn: 302727
OpenPOWER on IntegriCloud