summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the input.output libraryEric Fiselier2017-04-1826-121/+96
| | | | llvm-svn: 300626
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in algorithmEric Fiselier2017-04-1816-110/+72
| | | | llvm-svn: 300625
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros for std::initializer_listEric Fiselier2017-04-186-17/+29
| | | | llvm-svn: 300623
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in thread.Eric Fiselier2017-04-187-60/+54
| | | | llvm-svn: 300622
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in std::unordered_map and ↵Eric Fiselier2017-04-1824-234/+98
| | | | | | | | std::unordered_multimap This completes the cleanup of the containers, at least within the tests. llvm-svn: 300620
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::unordered_set and ↵Eric Fiselier2017-04-1827-280/+104
| | | | | | std::unordered_multiset llvm-svn: 300619
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> for std::queue and std::priority_queue.Eric Fiselier2017-04-1821-102/+79
| | | | llvm-svn: 300604
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macro uses in std::stack.Eric Fiselier2017-04-1811-47/+38
| | | | llvm-svn: 300602
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::map and std::multimapEric Fiselier2017-04-1822-146/+79
| | | | llvm-svn: 300600
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> for std::set and std::multisetEric Fiselier2017-04-1825-137/+90
| | | | llvm-svn: 300595
* [test] Silence another unused-typedef warningCasey Carter2017-04-181-1/+0
| | | | llvm-svn: 300581
* [test] Silence unused parameter/typedef warningsCasey Carter2017-04-183-4/+2
| | | | llvm-svn: 300575
* Mark LWG#2788 as complete - we already do thisMarshall Clow2017-04-181-1/+1
| | | | llvm-svn: 300568
* Emit benchmark tests into the benchmarks build directory, not lib/Eric Fiselier2017-04-181-1/+3
| | | | llvm-svn: 300533
* Update google benchmarkEric Fiselier2017-04-1841-159/+1227
| | | | llvm-svn: 300530
* Allow a standard library to implement conditional noexcept for optional and ↵Billy Robert O'Neal III2017-04-182-6/+14
| | | | | | | | | | 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: 300516
* Work around GCC 4.9 bug regarding default initialization of const variablesEric Fiselier2017-04-171-13/+15
| | | | llvm-svn: 300510
* Fix passing incorrectly value-category when constructing unique_ptr's deleterEric Fiselier2017-04-172-5/+100
| | | | llvm-svn: 300489
* [optional] Update synopsis for LWG2934Casey Carter2017-04-1713-56/+58
| | | | | | (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-173-2/+50
| | | | | | 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-1612-124/+69
| | | | llvm-svn: 300415
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <list>Eric Fiselier2017-04-1610-100/+62
| | | | llvm-svn: 300414
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in dequeEric Fiselier2017-04-1611-144/+98
| | | | llvm-svn: 300413
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <array>Eric Fiselier2017-04-162-3/+5
| | | | 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-1620-146/+103
| | | | | | | | | | | | | 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
* [CMake][libcxx] Fix the --target and --gcc-toolchain flag handlingPetr Hosek2017-04-162-3/+3
| | | | | | | | | | | CMake has the problem with the single dash variant because of the space, so use the double dash with equal sign version. We also don't have to pass the target triple when checking for compiler-rt since that flag is already included in compile flags now. Differential Revision: https://reviews.llvm.org/D32068 llvm-svn: 300409
* Cleanup and better scope unique_ptr internalsEric Fiselier2017-04-161-25/+20
| | | | llvm-svn: 300408
* Cleanup default_delete specializationsEric Fiselier2017-04-161-55/+43
| | | | llvm-svn: 300407
* Overhaul unique_ptr - Implement LWG 2801, 2905, 2520.Eric Fiselier2017-04-1619-428/+1278
| | | | | | | | | | | | | | | | | | | | | 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-156-47/+102
| | | | | | | 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-153-6/+51
| | | | llvm-svn: 300397
* [libcxx] Fix check-cxx-abilist on OS XEric Fiselier2017-04-153-14/+12
| | | | | | | | | | | | | | | | | | | | Summary: Recent commits broke the check-cxx-abilist by changing the default OS X to use `-rexport_library` instead of `-reexport_symbol_list`. Apparently `-reexport_library` doesn't export the symbols into `libc++.dylib`s symbol table, whereas `-reexport_symbol_list` does. This means the change removed ~500 symbols from the symbol table. I've been told this change is non ABI breaking, but it does make it harder to maintain the ABI lists, and hence the ABI. This patch fixes the issue by switching back to `-reexport_symbol_list`. It still avoid the issues fixed in r299052 by putting the new/delete symbols in a different symbol list file, which is only exported when LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS in OFF. Reviewers: mehdi_amini, smeenai, dexonsmith Reviewed By: smeenai Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D31644 llvm-svn: 300390
* 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
* Make clang-format use C++03 syntaxEric Fiselier2017-04-151-0/+1
| | | | llvm-svn: 300387
* [libcxx] Direct support for FuchsiaPetr Hosek2017-04-133-2/+27
| | | | | | | | | | | Fuchsia's libc was forked from musl, but has evolved sufficiently since then so it no longer makes sense to pretend it's musl. This change implements direct support for Fuchsia rather than piggybacking on musl support. Differential Revision: https://reviews.llvm.org/D31970 llvm-svn: 300261
* [libc++] Add _LIBCPP_DISABLE_EXTERN_TEMPLATE config optionShoaib Meenai2017-04-132-0/+10
| | | | | | | | | | | | | | | | | | When the libc++ extern template macros were added, the intent was for it to be possible for consumers of the headers to disable extern templates (via `-D_LIBCPP_EXTERN_TEMPLATE(...)=`). Unfortunately, support for specifying function-like macros varies on the command line varies across compilers (e.g. MSVC doesn't support it at all), and cmake doesn't allow it for the same reason. Add a non-function macro for this purpose. The intended use is for libraries which want to use the libc++ headers without taking a dependency on the libc++ library itself. I can name the macro something which reflects its intent rather than its behavior (e.g. `_LIBCPP_HEADER_ONLY`) if desired. Differential Revision: https://reviews.llvm.org/D31725 llvm-svn: 300246
* Remove the binders from C++17. Reviewed as https://reviews.llvm.org/D31769Marshall Clow2017-04-1347-24/+748
| | | | llvm-svn: 300232
* Implement LWG#2855 - made easy by previous refactoringMarshall Clow2017-04-133-4/+14
| | | | llvm-svn: 300218
* [libc++] Explicitly set output directory for DLLShoaib Meenai2017-04-131-0/+1
| | | | | | | DLLs on Windows are treated as runtime targets. Explicitly set the output directory for them, to be consistent with other platforms. llvm-svn: 300206
* Refactor throw_with_nested. NFC.Marshall Clow2017-04-131-31/+39
| | | | llvm-svn: 300197
* 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-134-17/+51
| | | | | | | | | | | | | | | 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-133-3/+3
| | | | 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
OpenPOWER on IntegriCloud