summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] [test] Don't detect Windows' UCRT with TEST_COMPILER_C1XXBilly Robert O'Neal III2018-10-202-7/+3
| | | | | | The test is trying to avoid saying aligned_alloc on Windows' UCRT, which does not (and can not) implement aligned_alloc. However, it's testing for c1xx, meaning clang on Windows will fail this test when using the UCRT. llvm-svn: 344829
* [libcxx] [test] Add missing <stdexcept> to map at tests.Billy Robert O'Neal III2018-10-192-3/+5
| | | | | | Reviewed as https://reviews.llvm.org/D50551 llvm-svn: 344821
* Repair thread-unsafe modifications of n_alive in F.pass.cppBilly Robert O'Neal III2018-10-191-4/+10
| | | | | | | | In this example, the ctor of G runs in the main thread in the expression G(), and also in the copy ctor of G() in the DECAY_COPY inside std::thread. The main thread destroys the G() instance at the semicolon, and the started thread destroys the G() after it returns. Thus there is a race between the threads on the n_alive variable. The fix is to join with the background thread before attempting to destroy the G in the main thread. llvm-svn: 344820
* [libcxx] Improve reporting when running the lit test suiteLouis Dionne2018-10-171-10/+10
| | | | | | | | | | | | | | | Summary: Running the test suite with -a will now properly show all the executed commands. The reports also include the environment under which the test is being executed, which is helpful for reproducing issues. Reviewers: EricWF Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D53215 llvm-svn: 344700
* [libcxx] Mark chrono literal unit tests as being unsupported on AppleClang 10Louis Dionne2018-10-174-4/+4
| | | | llvm-svn: 344661
* [libcxx] Avoid repeating the definition of std:: namespacesLouis Dionne2018-10-161-20/+6
| | | | | | This reduces code duplication a tiny bit. llvm-svn: 344642
* [libcxx] Remove _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITYLouis Dionne2018-10-165-41/+40
| | | | | | | | | | | | That macro has been defined to _LIBCPP_HIDE_FROM_ABI_AFTER_V1 for many weeks now, so we're actually replacing uses of it for uses of _LIBCPP_HIDE_FROM_ABI_AFTER_V1 directly. This should not change or break anything since the two macros are 100% equivalent, unless somebody is (incorrectly!) relying on _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY being defined. llvm-svn: 344641
* Recommit <chrono> changes with a couple xtra tests marked to fail on apple's ↵Marshall Clow2018-10-16180-2/+10901
| | | | | | clang. Reviewed as D51762 llvm-svn: 344627
* Partial fix for PR38964. (<string> can't be built with gcc -std=c++03) ↵Marshall Clow2018-10-161-0/+10
| | | | | | Reviewed as https://reviews.llvm.org/D52240 llvm-svn: 344616
* Re-apply r344546 "Mark a couple of test cases as 'C++17-only'..."Artem Dergachev2018-10-162-2/+6
| | | | | | Reverted too much in r344580. llvm-svn: 344582
* Revert r344529 "Implement the first part of the calendar support for C++20"Artem Dergachev2018-10-16183-10964/+3
| | | | | | | | | | Revert r344535 "Wrap up the new chrono literals in an #ifdef..." Revert r344546 "Mark a couple of test cases as 'C++17-only'..." Some of the buildbot failures were masked by another error, and this one was probably missed. llvm-svn: 344580
* [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
OpenPOWER on IntegriCloud