summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx][test] Improve assert messageJan Korous2018-04-041-3/+11
| | | | llvm-svn: 329194
* [libcxx][cmake] Remove libatomic temporarily from CMAKE_REQUIRED_LIBRARIES ↵Simon Dardis2018-04-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | when configuring When libcxx is built in tree for a host which requires libatomic, LLVM's configuration steps will determine it is required and add it to CMAKE_REQUIRED_LIBRARIES. When libcxx is later configured, it tests if it has C++ atomics without libatomic. The test erroneously passes as libatomic is already part of the set of required libraries. In turn, a number of the atomic tests will fail as they require libatomic but the test suite is configured not to use libatomic. Address this by always dropping libatomic from the set of required libraries before determining if LIBCXX_HAVE_CXX_ATOMICS_WITHOUT_LIB is true, then restoring the set of required libraries. Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D43509 llvm-svn: 329167
* Fix undefined macro issue in locale tests; Try 2Eric Fiselier2018-04-043-9/+15
| | | | llvm-svn: 329149
* Fix undefined macro issue in locale testsEric Fiselier2018-04-042-1/+7
| | | | llvm-svn: 329148
* Update Clang version on Appveyor botsEric Fiselier2018-04-041-1/+1
| | | | llvm-svn: 329145
* Touch up tests for new <version> header; fix module.modulemap.Eric Fiselier2018-04-043-3/+5
| | | | | | | | | | | This patch does some housekeeping for the new <version> header. It adds it to the module.modulemap, and the double_include.sh.cpp test. Additionally it corrects the // UNSUPPORTED options for the libc++ specific test. The header needs to compile under C++03 to support modules, and it should compile under all available compilers. llvm-svn: 329144
* Fix locale test data for GLIBC 2.27 and newer.Eric Fiselier2018-04-046-38/+101
| | | | | | | | GLIBC 2.27 changed the locale data for fr_FR and ru_RU. In particular they change the decimal and thousands separators used. This patch makes the locale tests tolerate the updated locales. llvm-svn: 329143
* Implement P0754R2: The <version> header.Marshall Clow2018-04-034-2/+67
| | | | llvm-svn: 329075
* Fix fs::proximate tests on platforms where /net exists.Eric Fiselier2018-04-031-4/+4
| | | | | | | | | The proximate tests depended on `/net` not being a valid path, however, on OS X it is. Correct the tests to handle this. llvm-svn: 329038
* Implement P0430R2 - File system library on non-POSIX systems.Eric Fiselier2018-04-024-14/+69
| | | | | | | | | | | This patch implements P0430R2, who's largest change is adding the path::format enumeration for supporting path format conversions in path constructors. However, since libc++'s filesystem only really supports POSIX like systems, there are no real changes needed. This patch simply adds the format enum and then ignores it when it's passed to constructors. llvm-svn: 329031
* Implement filesystem NB comments, relative paths, and related issues.Eric Fiselier2018-04-0230-884/+1795
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fairly large patch that implements all of the filesystem NB comments and the relative paths changes (ex. adding weakly_canonical). These issues and papers are all interrelated so their implementation couldn't be split up nicely. This patch upgrades <experimental/filesystem> to match the C++17 spec and not the published experimental TS spec. Some of the changes in this patch are both API and ABI breaking, however libc++ makes no guarantee about stability for experimental implementations. The major changes in this patch are: * Implement NB comments for filesystem (P0492R2), including: * Implement `perm_options` enum as part of NB comments, and update the `permissions` function to match. * Implement changes to `remove_filename` and `replace_filename` * Implement changes to `path::stem()` and `path::extension()` which support splitting examples like `.profile`. * Change path iteration to return an empty path instead of '.' for trailing separators. * Change `operator/=` to handle absolute paths on the RHS. * Change `absolute` to no longer accept a current path argument. * Implement relative paths according to NB comments (P0219r1) * Combine `path.cpp` and `operations.cpp` since some path functions require access to the operations internals, and some fs operations require access to the path parser. llvm-svn: 329028
* [libcxx] Disable testing with system lib for 2 tests verifying debug mode.Volodymyr Sapsai2018-04-022-0/+6
| | | | llvm-svn: 329023
* fix typo in align_const_pair_U_V.pass.cppEric Fiselier2018-03-291-1/+1
| | | | llvm-svn: 328760
* Move libc++ pair/tuple assign test to libcxx/ test directory.Eric Fiselier2018-03-293-44/+46
| | | | | | | | | | | Libc++ implements the pair& operator=(pair<U, V>) assignment operator using a single template that handles assignment from all tuple-like types. This patch moves the test for that to the libcxx test directory since it's non-standard. It also adds additional tests to the std/.../pair directory to test the standard behavior this template implements. llvm-svn: 328758
* Fix PR36914 - num_get::get(unsigned) incorrectly handles negative numbers.Eric Fiselier2018-03-293-17/+180
| | | | | | | | | This patch corrects num_get for unsigned types to support strings with a leading `-` character. According to the standard the number should be parsed as an unsigned integer and then negated. llvm-svn: 328751
* Fix test case initialization issues in permissions testEric Fiselier2018-03-261-1/+7
| | | | llvm-svn: 328477
* Implement filesystem::perm_options specified in NB comments.Eric Fiselier2018-03-266-60/+119
| | | | | | | | | | The NB comments for filesystem changed permissions and added a new enum `perm_options` which control how the permissions are applied. This implements than NB resolution llvm-svn: 328476
* Make filesystem tests generic between experimental and std versions.Eric Fiselier2018-03-26109-235/+192
| | | | | | | | | | | | | | | As I move towards implementing std::filesystem, there is a need to make the existing tests run against both the std and experimental versions. Additionally, it's helpful to allow running the tests against other implementations of filesystem. This patch converts the test to easily target either. First, it adds a filesystem_include.hpp header which is soley responsible for selecting and including the correct implementation. Second, it converts existing tests to use this header instead of including filesystem directly. llvm-svn: 328475
* avoid new/delete ellision in construct.pass.cppEric Fiselier2018-03-251-0/+4
| | | | llvm-svn: 328445
* Partially Revert "Workaround GCC bug PR78489 - SFINAE order is not respected."Eric Fiselier2018-03-231-12/+17
| | | | | | | | | | This partially reverts commit r328261. The GCC bug has been fixed in trunk and has never existed in a released version. Therefore the changes to variant are unneeded. However, the additional tests have been left in place. llvm-svn: 328388
* Add temporary printouts to test to help debug failures.Eric Fiselier2018-03-222-0/+12
| | | | | | | | | | | Some debian libc++ bots started having failures in the locale tests due to what I assume is a change in the locale data for fr_FR in glibc. This change prints the actual value from the test to help debugging. It should be reverted once the bots cycle. llvm-svn: 328268
* Avoid Clang error about throwing _LIBCPP_ASSERT in noexcept function.Eric Fiselier2018-03-224-25/+25
| | | | | | | | | | | | | This fixes a couple of tests which produced a warning that a 'throw' occurred in a noexcept function (by way of _LIBCPP_ASSERT). It does so by hiding the 'throw' across an opaque function boundary. This fix isn't ideal, since we still have _LIBCPP_ASSERT's in functions marked noexcept -- and this problem should be addressed in the future. However, throwing _LIBCPP_ASSERT is really only meant to allow testing of the assertions, and is not yet ready for general use. llvm-svn: 328265
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-03-223-4/+4
| | | | llvm-svn: 328264
* Workaround GCC bug PR78489 - SFINAE order is not respected.Eric Fiselier2018-03-222-17/+18
| | | | | | | | | | | This patch works around variant test failures which are new to GCC 8. GCC 8 either doesn't perform SFINAE in lexical order, or it doesn't halt after encountering the first failure. This causes hard error to occur instead of substitution failure. See gcc.gnu.org/PR78489 llvm-svn: 328261
* Use DoNotOptimize to prevent new/delete elision.Eric Fiselier2018-03-2217-47/+74
| | | | | | | | | | | The new/delete tests, in particular those which test replacement functions, often fail when the optimizer is enabled because the calls to new/delete may be optimized away, regardless of their side-effects. This patch converts the tests to use DoNotOptimize in order to prevent the elision. llvm-svn: 328245
* Un-XFAIL a test under new GCC version; the GCC bug has been fixedEric Fiselier2018-03-221-1/+1
| | | | llvm-svn: 328229
* Fix improperly failing test - and the code it was testing. Thanks to Stephan ↵Marshall Clow2018-03-222-6/+5
| | | | | | Lavavej for the catch. llvm-svn: 328225
* commit temporary workaround for new Clang exception warningEric Fiselier2018-03-221-0/+5
| | | | llvm-svn: 328186
* Correct TEST_HAS_NO_ALIGNED_ALLOCATION macro definitionEric Fiselier2018-03-221-2/+3
| | | | llvm-svn: 328185
* Fix dynarray test failures after changing __libcpp_allocate/deallocateEric Fiselier2018-03-221-7/+8
| | | | llvm-svn: 328182
* Fix PR22634 - std::allocator doesn't respect over-aligned types.Eric Fiselier2018-03-229-86/+342
| | | | | | | | | | | | | | | | | | | | This patch fixes std::allocator, and more specifically, all users of __libcpp_allocate and __libcpp_deallocate, to support over-aligned types. __libcpp_allocate/deallocate now take an alignment parameter, and when the specified alignment is greater than that supported by malloc/new, the aligned version of operator new is called (assuming it's available). When aligned new isn't available, the old behavior has been kept, and the alignment parameter is ignored. This patch depends on recent changes to __builtin_operator_new/delete which allow them to be used to call any regular new/delete operator. By using __builtin_operator_new/delete when possible, the new/delete erasure optimization is maintained. llvm-svn: 328180
* Implement LWG3034: P0767R1 breaks previously-standard-layout typesMarshall Clow2018-03-219-11/+192
| | | | llvm-svn: 328064
* Implement LWG3035: std::allocator's constructors should be constexpr.Marshall Clow2018-03-202-7/+68
| | | | llvm-svn: 328059
* Implement LWG 3039 and 3041 - 'Treating Unnecessary decay'.Marshall Clow2018-03-202-5/+5
| | | | llvm-svn: 328054
* Updated C++2a status with changes from Jacksonville WG21 meetingMarshall Clow2018-03-181-1/+46
| | | | llvm-svn: 327806
* [libcxx][test] Adding apple-clang-9 to UNSUPPORTED in ↵Mike Edwards2018-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | iter_alloc_deduction.fail.cpp. After two failed attempts last week to make this work I am going back to a known good method of making this test pass on macOS...adding the current apple-clang version to the UNSUPPORTED list. During a previous patch review (https://reviews.llvm.org/D44103) it was suggested to just XFAIL libcpp-no-deduction-guides as was done to iter_alloc_deduction.pass.cpp. However this caused a an unexpected pass on: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc-tot-latest-std/builds/214 I then attempted to just mark libcpp-no-deduction-guides as UNSUPPORTED, however this caused an additional bot failure. So I reverted everything (https://reviews.llvm.org/rCXX327191). To solve this and get work unblocked I am adding apple-clang-9 to the original UNSUPPORTED list. llvm-svn: 327304
* [CMake] Copy the generated __config header into build directoryPetr Hosek2018-03-102-15/+27
| | | | | | | | | | | | | | When the generated __config file is being used, it is currently only copied during installation process. However, that means that the file that gets copied into LLVM build directory is the vanilla __config file, and any parts of the build that depend on the just built toolchain like sanitizers will get that instead of the generated version. To avoid this issue, we need to copy the generated header into the LLVM build directory as well. Differential Revision: https://reviews.llvm.org/D43797 llvm-svn: 327194
* [libcxx][test] Reverting r327178 and r327190.Mike Edwards2018-03-101-1/+2
| | | | | | | Reverting changes made to iter_alloc_deduction.fail.cpp as my changes seem to be making several Linux bots angry. llvm-svn: 327191
* [libcxx][test] Marking libcpp-no-deduction-guides unsupported.Mike Edwards2018-03-101-1/+1
| | | | | | This fixes linux bot failures with r327178. llvm-svn: 327190
* XFAIL: libcpp-no-deduction-guides in ↵Mike Edwards2018-03-091-2/+1
| | | | | | | | | | | | | | | | libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp Summary: Refactor the previous version method of marking each apple-clang version as UNSUPPORTED and just XFAIL'ing the libcpp-no-deduction-guides instead. This brings this test inline with the same style as iter_alloc_deduction.pass.cpp Reviewers: EricWF, dexonsmith Reviewed By: EricWF Subscribers: EricWF, vsapsai, vsk, cfe-commits Differential Revision: https://reviews.llvm.org/D44103 llvm-svn: 327178
* Low-hanging fruit optimization in string::__move_assign().Vedant Kumar2018-03-082-6/+69
| | | | | | | | | | | | | | | shrink_to_fit() ends up doing a lot work to get information that we already know since we just called clear(). This change seems concise enough to be worth the couple extra lines and my benchmarks show that it is indeed a pretty decent win. It looks like the same thing is going on twice in __copy_assign_alloc(), but I didn't want to go overboard since this is my first contribution to llvm/libc++. Patch by Timothy VanSlyke! Differential Revision: https://reviews.llvm.org/D41976 llvm-svn: 327064
* Implement LWG#2518 - Non-member swap for propagate_const should call member swapMarshall Clow2018-03-082-4/+3
| | | | llvm-svn: 327005
* Include <system_error> since we use it. Thanks to Andrey Maksimov for the catch.Marshall Clow2018-03-071-0/+1
| | | | llvm-svn: 326958
* One more test for P0767:Marshall Clow2018-03-061-0/+8
| | | | llvm-svn: 326802
* Implement P0767R1 - Deprecate PODMarshall Clow2018-03-064-3/+116
| | | | llvm-svn: 326801
* Added P0805 to the list of ready bitsMarshall Clow2018-03-011-2/+3
| | | | llvm-svn: 326485
* [libcxx] Fix last_write_time test for filesystems that don't support very ↵Volodymyr Sapsai2018-02-281-10/+32
| | | | | | | | | | | | | | | | | | | | | small times. APFS minimum supported file write time is -2^63 nanoseconds, which doesn't go as far as `file_time_type::min()` that is equal to -2^63 microseconds on macOS. This change doesn't affect filesystems that support `file_time_type` range only for in-memory file time representation but not for on-disk representation. Such filesystems are considered as `SupportsMinTime`. rdar://problem/35865151 Reviewers: EricWF, Hahnfeld Subscribers: jkorous-apple, mclow.lists, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D42755 llvm-svn: 326383
* [libcxx] [test] Fix MSVC warnings and errors.Stephan T. Lavavej2018-02-2610-75/+76
| | | | | | | | | | | | | | | | | | | | | | | | test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp Fix MSVC x64 truncation warnings. warning C4267: conversion from 'size_t' to 'int', possible loss of data test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp Fix MSVC uninitialized memory warning. warning C6001: Using uninitialized memory 'vl'. test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp Include <cassert> for the assert() macro. Fixes D43273. llvm-svn: 326120
* Cleanup __config indention NFCLogan Chien2018-02-241-420/+432
| | | | | | | | | | | | | | | | | | This commit indents each level by two space characters, e.g. #if defined(CONDITION) # define _LIBCPP_NAME VALUE #else # define _LIBCPP_NAME VALUE #endif The simple #ifndef, #define, and #endif sequences are not indented, e.g. #ifndef _LIBCPP_NAME #define _LIBCPP_NAME ... #endif llvm-svn: 326027
* Allow passing additional compiler/linker flags for the testsAlexander Richardson2018-02-233-0/+14
| | | | | | | | | | | | | | | | | | | Summary: These flags can be specified using the CMake variables LIBCXX_TEST_LINKER_FLAGS and LIBCXX_TEST_COMPILER_FLAGS. When building the tests for CHERI I need to pass additional flags (such as -mabi=n64 or -mabi=purecap) to the compiler for our test configurations Reviewers: EricWF Reviewed By: EricWF Subscribers: christof, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D42139 llvm-svn: 325914
OpenPOWER on IntegriCloud