summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] Remove custom CMake code targeting Mac OS 10.6Louis Dionne2018-10-162-9/+4
| | | | | | | | | | | | | libc++ has dropped support for Mac OS 10.6 for a while, and we don't have any testers set up for that OS. This commit puts in an error message so that people can reach out to the libc++ maintainers in case support for 10.6 is still expected (as opposed to silently failing in weird ways). We can completely drop support for 10.6 and remove the error message some time in the future when we're sure that nobody is relying on it. llvm-svn: 344576
* Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232Marshall Clow2018-10-152-2/+6
| | | | llvm-svn: 344546
* Wrap up the new chrono literals in an #ifdef so that old versions of clang ↵Marshall Clow2018-10-154-1/+10
| | | | | | don't complain. I'm looking at you, clang 5.0.1 llvm-svn: 344535
* Implement the first part of the calendar support for C++20. This is still ↵Marshall Clow2018-10-15180-1/+10949
| | | | | | incomplete; there will be more patches coming. Reviewed as D51762 llvm-svn: 344529
* One more local type warning removed from the tests. NFCMarshall Clow2018-10-121-8/+12
| | | | llvm-svn: 344421
* Update the array tests to not use a local type; removes warnings in C++03. NFCMarshall Clow2018-10-123-9/+13
| | | | llvm-svn: 344417
* Update all the max_size tests to eliminate signed/unsigned comparison ↵Marshall Clow2018-10-1212-62/+62
| | | | | | warnings. NFC llvm-svn: 344416
* Add benchmarks for std::function.Samuel Benzaquen2018-10-122-0/+324
| | | | | | | | | | | | | | | | | | | Summary: Benchmarks for construct, copy, move, swap, destroy and invoke, with 8 different input states. For the cases that matter, it tests with and without allowing constant value propagation from construction into the operation tested. This also adds helper functions to generate the cartesian product of different configurations and generate benchmarks for all of them. Reviewers: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D53087 llvm-svn: 344415
* [NFC][libc++] Fix broken link in commentLouis Dionne2018-10-121-1/+1
| | | | llvm-svn: 344369
* Revert commit r344254; does not work with C++03Marshall Clow2018-10-111-39/+14
| | | | llvm-svn: 344261
* Prefer to use the __is_XXX compiler intrinsics to the (old, busted) ↵Marshall Clow2018-10-111-14/+39
| | | | | | __has_XXX intrinsics when implementing type traits. Thanks to Richard Smith for the patch. llvm-svn: 344254
* Add a test that shows what happens with throwing destructors. NFC.Marshall Clow2018-10-111-0/+11
| | | | llvm-svn: 344220
* Fix use of removed _LIBCPP_HAS_NO_BUILTIN_ALIGNED_OPERATOR_NEW_DELETEEric Fiselier2018-10-111-1/+1
| | | | | | | It was replaced with the better named _LIBCPP_HAS_NO_BUILTIN_OVERLOADED_OPERATOR_NEW_DELETE. llvm-svn: 344214
* Distinguish between library and language support for aligned allocation.Eric Fiselier2018-10-114-29/+33
| | | | | | | | | | | | | | | | | | | | There are two cases: 1. The library has all it needs to provide align_val_t and the new/delete overloads needed to support aligned allocation. 2. The compiler has actually turned the language feature on. There are times where libc++ needs to distinguish between the two. This patch adds the additional macro _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION which denotes when case (1) does not hold. _LIBCPP_HAS_NO_ALIGNED_ALLOCATION is defined whenever _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION is defined, or when the compiler has not enabled the language feature. Additionally this patch cleans up a number of other macros related to detection of aligned allocation machinery. llvm-svn: 344207
* Use TEST_STD_VER instead of __cplusplus [NFC]Aaron Puchert2018-10-1024-24/+49
| | | | | | | | While __cplusplus was only used a few dozen times, TEST_STD_VAR is used more than 2000 times. So we replace the former by the latter for consistency in the tests. There should be no functional change. llvm-svn: 344194
* Use std::scoped_lock only for C++17 and newerAaron Puchert2018-10-101-0/+2
| | | | | | This fixes a test failure caused by D53049. llvm-svn: 344192
* Add test macros for always_inline and noinlineEric Fiselier2018-10-103-10/+23
| | | | llvm-svn: 344167
* Fix linking filesystem benchmarksEric Fiselier2018-10-101-1/+4
| | | | llvm-svn: 344160
* Annotate scoped_lock as with scoped_lockable attributeAaron Puchert2018-10-092-1/+7
| | | | | | | | | | | | | | | | | | Summary: Scoped capabilities need to be annotated as such, otherwise the thread safety analysis won't work as intended. Fixes PR39234. Reviewers: ldionne Reviewed By: ldionne Subscribers: christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D53049 llvm-svn: 344096
* [libcxx] Mark std::async race condition test as unsupported on DarwinLouis Dionne2018-10-091-0/+4
| | | | | | | | | | PR38682 added a test to check for a race condition in std::future. Part of the fix is part of the dylib, but there is no released version of mac OS X that ships a dylib containing the fix. Hence, this test can (and sometimes does) when testing on OS X. This commit marks the test as unsupported to avoid spurious failures. llvm-svn: 344053
* Do the math in uniform_int_distribution::operator() as unsigned to prevent ↵Marshall Clow2018-10-081-2/+3
| | | | | | UB when overflowing. Also add a UBSAN notification that we're ffine with unsigned overflow. This fixes PR#32617. Thanks to Vincent & Christoph for their help with this issue. llvm-svn: 343996
* Papers and Issues for San DiegoMarshall Clow2018-10-061-54/+81
| | | | llvm-svn: 343923
* [CMake] Use just basename when copying C++ ABI headersPetr Hosek2018-10-041-1/+1
| | | | | | | | | | This avoids duplicate directories when the filename includes path. Fixes PR39145 Differential Revision: https://reviews.llvm.org/D52762 llvm-svn: 343753
* [libc++][NFC] Add error messages to a couple of static_asserts in spanLouis Dionne2018-10-031-3/+3
| | | | | | | | | | | | | | | | | Summary: Add error messages to a couple of static_asserts in span to match the style used in the rest of the file. Also fix an extra paren typo in a assert error message. Committed on behalf of Jason Lovett. Reviewers: ldionne Subscribers: libcxx-commits Differential Revision: https://reviews.llvm.org/D52841 llvm-svn: 343725
* Remove redundant null pointer check in operator deleteFangrui Song2018-10-011-5/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: C89 4.10.3.2 The free function C99 7.20.3.2 The free function C11 7.22.3.3 The free function If ptr is a null pointer, no action shall occur. _aligned_free on MSDN: If memblock is a NULL pointer, this function simply performs no actions. Reviewers: EricWF, mclow.lists, khng300, hotpxl Reviewed By: mclow.lists, khng300, hotpxl Subscribers: lichray, llvm-commits, hotpxl, khng300, christof, ldionne, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52401 llvm-svn: 343503
* Attempt to fix aligned allocation configuration under clang-clEric Fiselier2018-10-011-0/+4
| | | | | | | | | | When we're using clang-cl and Microsoft's runtime implementation, we don't provide align_val_t or aligned new/delete ourselves. This patch updates the _LIBCPP_HAS_NO_ALIGNED_ALLOCATION macro to reflect this. llvm-svn: 343441
* Remove one more warning from clang-cl buildEric Fiselier2018-10-011-0/+1
| | | | llvm-svn: 343440
* Fix Shadowing warning on WindowsEric Fiselier2018-10-011-2/+2
| | | | llvm-svn: 343439
* Fix even more Clang warnings.Eric Fiselier2018-10-016-10/+14
| | | | | | | This patch disables shift-sign-overflow warnings for now. It also fixes most -Wfloat-equal warnings and -Wextra-semi warnings. llvm-svn: 343438
* Bump default dialect to C++14 for clang-clEric Fiselier2018-10-011-1/+1
| | | | llvm-svn: 343437
* Remove even more clang-cl warningsEric Fiselier2018-10-011-1/+5
| | | | llvm-svn: 343436
* Mork more tests as FLAKYEric Fiselier2018-10-012-1/+2
| | | | llvm-svn: 343435
* Remove even more warnings from clang-cl buildEric Fiselier2018-10-011-5/+9
| | | | llvm-svn: 343434
* Turn off warnings under clang-clEric Fiselier2018-10-011-0/+12
| | | | llvm-svn: 343433
* Fix threaded test under no-threading configurationEric Fiselier2018-10-012-0/+4
| | | | llvm-svn: 343432
* Attempt to unbreak Windows configuration.Eric Fiselier2018-10-012-1/+5
| | | | | | | | | | | Although libc++ doesn't yet support Windows we still have Windows builders to track our progress. Currently the clang-cl configuration seems broken because it doesn't support -std=c++11 and instead requires /std:c++11. This patch attempts to fix this. llvm-svn: 343431
* [cxx2a] Fix warning triggered by r343285Vitaly Buka2018-09-291-1/+0
| | | | llvm-svn: 343369
* [libc++] Remove Fuchsia-specific knowledge to pick the ABI versionLouis Dionne2018-09-262-12/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: The ABI version used by libc++ is a configuration option just like any other configuration option. It is a knob that can be used by vendors to customize the libc++ that they ship. As such, we should not be hardcoding vendor-specific configuration choices in libc++. When building libc++ for Fuchsia, Fuchsia's build scripts should simply define the libc++ ABI version to 2 -- this will result in the _LIBCPP_ABI_VERSION macro being defined in the __config header that is generated when libc++ is built and installed, which is the correct way to customize libc++'s behavior for specific vendors. Reviewers: phosek, EricWF Subscribers: mgorny, christof, dexonsmith, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52397 llvm-svn: 343079
* Revert r342936 "Remove redundant null pointer check in operator delete"Louis Dionne2018-09-251-3/+5
| | | | | | | | A review for the change was opened in https://reviews.llvm.org/D52401 but the change was committed before being approved by any of the code owners for libc++. llvm-svn: 342938
* Remove redundant null pointer check in operator deleteFangrui Song2018-09-251-5/+3
| | | | | | | | | | | | | | | | | | | | C89 4.10.3.2 The free function C99 7.20.3.2 The free function C11 7.22.3.3 The free function If ptr is a null pointer, no action shall occur. _aligned_free on MSDN: If memblock is a NULL pointer, this function simply performs no actions. Reviewers: EricWF, mclow.lists Subscribers: christof, ldionne, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52401 llvm-svn: 342936
* [libcxx] Fix the binder deprecation tests on Clang 5.Louis Dionne2018-09-2311-110/+46
| | | | | | Tested on Docker containers with Clang 4, 5 and 6. llvm-svn: 342855
* [libcxx] Fix buildbots on DebianLouis Dionne2018-09-2311-0/+11
| | | | | | | | | | | | | | | | Debian build bots are running Clang 4, which apparently does not support the "deprecated" attribute properly. Clang pretends to support the attribute, but the attribute doesn't do anything. (live example: https://wandbox.org/permlink/0De69aXns0t1D59r) On a separate note, I'm not sure I understand why we're even running the libc++ tests under Clang-4. Is this a configuration we support? I can understand that libc++ should _build_ with Clang 4, but it's not clear to me that new libc++ headers should be usable under older compilers like that. llvm-svn: 342854
* [libcxx] Document new symbols __u64toa and __u32toa on DarwinLouis Dionne2018-09-232-0/+5
| | | | | | | | | | | | | | Summary: This is the counterpart for https://reviews.llvm.org/D50130 and https://reviews.llvm.org/D52391 on Darwin. Reviewers: EricWF Subscribers: christof, dexonsmith, cfe-commits, libcxx-commits, lichray Differential Revision: https://reviews.llvm.org/D52396 llvm-svn: 342849
* [libc++] Add deprecated attributes to many deprecated componentsLouis Dionne2018-09-2318-50/+551
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These deprecation warnings are opt-in: they are only enabled when the _LIBCXX_DEPRECATION_WARNINGS macro is defined, which is not the case by default. Note that this is a first step in the right direction, but I wasn't able to get an exhaustive list of all deprecated components per standard, so there's certainly stuff that's missing. The list of components this commit marks as deprecated is: in C++11: - auto_ptr, auto_ptr_ref - binder1st, binder2nd, bind1st(), bind2nd() - pointer_to_unary_function, pointer_to_binary_function, ptr_fun() - mem_fun_t, mem_fun1_t, const_mem_fun_t, const_mem_fun1_t, mem_fun() - mem_fun_ref_t, mem_fun1_ref_t, const_mem_fun_ref_t, const_mem_fun1_ref_t, mem_fun_ref() in C++14: - random_shuffle() in C++17: - unary_negate, binary_negate, not1(), not2() <rdar://problem/18168350> Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48912 llvm-svn: 342843
* [NFC][libcxx] Rename helpers with 4 underscores to something more reasonableLouis Dionne2018-09-231-14/+14
| | | | llvm-svn: 342840
* [NFC][libc++] Fix typo in the description of LIBCXX_INCLUDE_BENCHMARKSLouis Dionne2018-09-221-1/+1
| | | | llvm-svn: 342822
* Mark [[nodiscard]] tests unsupported on GCC prior to 7.0Eric Fiselier2018-09-221-0/+3
| | | | llvm-svn: 342821
* Fix UB in SIMD tests.Eric Fiselier2018-09-221-1/+1
| | | | | | | | | One of the SIMD tests attempted to left shift a value by 42, which is UB when the left hand side is a 32 bit integer type. This patch adjusts the test to use the value 4 instead of 42. llvm-svn: 342820
* [libcxx] Readjust nodiscard_extensions.pass.cpp test - just disable for ASANRoman Lebedev2018-09-221-2/+4
| | | | | | | | | | | In rL342814, i have committed a blind fix to unbreak the asan buildbot, but as it was later discussed, the leak is intentional, so we can not fix the failure that way. So this reverts the leak 'fix', and simply disables the test in the presence of ASAN. llvm-svn: 342819
* Mark test as flakyEric Fiselier2018-09-221-0/+2
| | | | llvm-svn: 342818
OpenPOWER on IntegriCloud