summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-03-222-2/+2
| | | | llvm-svn: 328264
* Workaround GCC bug PR78489 - SFINAE order is not respected.Eric Fiselier2018-03-221-0/+6
| | | | | | | | | | | 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-2216-45/+62
| | | | | | | | | | | 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-221-3/+4
| | | | | | Lavavej for the catch. llvm-svn: 328225
* Fix PR22634 - std::allocator doesn't respect over-aligned types.Eric Fiselier2018-03-221-22/+76
| | | | | | | | | | | | | | | | | | | | 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-216-2/+179
| | | | llvm-svn: 328064
* Implement LWG3035: std::allocator's constructors should be constexpr.Marshall Clow2018-03-201-0/+50
| | | | llvm-svn: 328059
* [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
* [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
* 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-063-1/+114
| | | | llvm-svn: 326801
* [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
* Add another test case to the deduction guide for basic_string.Marshall Clow2018-02-221-0/+11
| | | | llvm-svn: 325740
* [libcxx] Improve accuracy of complex asinh and acoshMikhail Maltsev2018-02-192-0/+18
| | | | | | | | | | | | | | | | | | | | Summary: Currently std::asinh and std::acosh use std::pow to compute x^2. This results in a significant error when computing e.g. asinh(i) or acosh(-1). This patch expresses x^2 directly via x.real() and x.imag(), like it is done in libstdc++/glibc, and adds tests that checks the accuracy. Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D41629 llvm-svn: 325510
* Fix test failure on compilers w/o deduction guidesEric Fiselier2018-02-151-2/+1
| | | | llvm-svn: 325205
* Add a catch for std::length_error for the case where the string can't handle ↵Marshall Clow2018-02-141-6/+7
| | | | | | 2GB. (like say 32-bit big-endian) llvm-svn: 325147
* Make the ctype_byname::widen test cases pass on FreeBSD.Dimitry Andric2018-02-132-2/+2
| | | | llvm-svn: 325028
* [libcxx] [test] Strip trailing whitespace, NFC.Stephan T. Lavavej2018-02-1237-57/+57
| | | | llvm-svn: 324959
* Use multi-key tree search for {map, set}::{count, equal_range}Eric Fiselier2018-02-108-0/+442
| | | | | | | | | | | | | | | | | | | | | | | Patch from ngolovliov@gmail.com Reviewed as: https://reviews.llvm.org/D42344 As described in llvm.org/PR30959, the current implementation of std::{map, key}::{count, equal_range} in libcxx is non-conforming. Quoting the C++14 standard [associative.reqmts]p3 > The phrase “equivalence of keys” means the equivalence relation imposed by > the comparison and not the operator== on keys. That is, two keys k1 and k2 are > considered to be equivalent if for the comparison object comp, > comp(k1, k2) == false && comp(k2, k1) == false. In the same section, the requirements table states the following: > a.equal_range(k) equivalent to make_pair(a.lower_bound(k), a.upper_bound(k)) > a.count(k) returns the number of elements with key equivalent to k The behaviour of libstdc++ seems to conform to the standard here. llvm-svn: 324799
* The apple versions of clang don't support deduction guides yet.Marshall Clow2018-02-082-0/+2
| | | | llvm-svn: 324640
* Once more, with feeling. Spell 'clang-4.0' correctly this timeMarshall Clow2018-02-082-2/+2
| | | | llvm-svn: 324624
* Clean up string's deduction guides tests. Mark old versions of clang as ↵Marshall Clow2018-02-083-58/+83
| | | | | | unsupported, b/c they don't have deduction guides, even in C++17 mode llvm-svn: 324619
* [libcxx] Avoid spurious construction of valarray elementsMikhail Maltsev2018-02-084-0/+81
| | | | | | | | | | | | | | | | | | | | | Summary: Currently libc++ implements some operations on valarray by using the resize method. This method has a parameter with a default value. Because of this, valarray may spuriously construct and destruct objects of valarray's element type. This patch fixes this issue and adds corresponding test cases. Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: rogfer01, cfe-commits Differential Revision: https://reviews.llvm.org/D41992 llvm-svn: 324596
* Temporarily comment out deduction guide tests while I figure out what to do ↵Marshall Clow2018-02-082-0/+3
| | | | | | with old bots llvm-svn: 324573
* Implement deduction guide for basic_string as described in P0433Marshall Clow2018-02-082-0/+110
| | | | llvm-svn: 324569
* Fix size and alignment of array<T, 0>.Eric Fiselier2018-02-071-2/+18
| | | | | | | | An array T[1] isn't necessarily the same say when it's a member of a struct. This patch addresses that problem and corrects the tests to deal with it. llvm-svn: 324545
* Fix PR#31454 - 'basic_string<T>::push_back() crashes if ↵Marshall Clow2018-02-071-2/+1
| | | | | | sizeof(T)>sizeof(long long)'. We were mishandling the small-string optimization calculations for very large 'characters'. This may be an ABI change (change the size of) strings of very large 'characters', but since they never worked, I'm not too concerned. llvm-svn: 324531
* Fix -verify static assert messages for older Clang versionsEric Fiselier2018-02-072-2/+2
| | | | llvm-svn: 324529
* [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default ↵Eric Fiselier2018-02-0714-4/+500
| | | | | | | | | | | | | | | | | | | constructible types. Summary: This patch fixes llvm.org/PR35491 and LWG2157 (https://cplusplus.github.io/LWG/issue2157) The fix attempts to maintain ABI compatibility by replacing the array with a instance of `aligned_storage`. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: lichray, cfe-commits Differential Revision: https://reviews.llvm.org/D41223 llvm-svn: 324526
* Remove more of the std::experimental bits that are now in std::. All the _v ↵Marshall Clow2018-02-0634-3188/+0
| | | | | | type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 324423
* Revert "[libc++] Fix PR35491 - std::array of zero-size doesn't work with ↵Nirav Dave2018-02-067-206/+0
| | | | | | | | | | | non-default constructible types." Revert "Fix initialization of array<const T, 0> with GCC." Revert "Make array<const T, 0> non-CopyAssignable and make swap and fill ill-formed." This reverts commit r324182, r324185, and r324194 which were causing issues with zero-length std::arrays. llvm-svn: 324309
* Remove <experimental/string_view>; use <string_view> instead. See ↵Marshall Clow2018-02-0580-16208/+0
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 324290
* Implement LWG 3014 - Fix more noexcept issues in filesystem.Eric Fiselier2018-02-043-4/+4
| | | | | | | | | This patch removes the noexcept declaration from filesystem operations which require creating temporary paths or creating a directory iterator. Either of these operations can throw. llvm-svn: 324192
* Remove debug println from rec.dir.itr.increment testEric Fiselier2018-02-041-2/+0
| | | | llvm-svn: 324190
* Implement LWG2989: path's streaming operators allow everything under the sun.Eric Fiselier2018-02-041-0/+33
| | | | | | | | | | | | | | | Because path can be constructed from a ton of different types, including string and wide strings, this caused it's streaming operators to suck up all sorts of silly types via silly conversions. For example: using namespace std::experimental::filesystem::v1; std::wstring w(L"wide"); std::cout << w; // converts to path. This patch tentatively adopts the resolution to LWG2989 and fixes the issue by making the streaming operators friends of path. llvm-svn: 324189
* Address LWG 2849 and fix missing failure condition in copy_file.Eric Fiselier2018-02-041-1/+6
| | | | | | | Previously copy_file didn't handle the case where the input and output were the same file. llvm-svn: 324187
* correct comment about C++03 assignment operatorsEric Fiselier2018-02-041-4/+4
| | | | llvm-svn: 324186
* Make array<const T, 0> non-CopyAssignable and make swap and fill ill-formed.Eric Fiselier2018-02-044-0/+160
| | | | | | | | | | | | The standard isn't exactly clear how std::array should handle zero-sized arrays with const element types. In particular W.R.T. copy assignment, swap, and fill. This patch takes the position that those operations should be ill-formed, and makes changes to libc++ to make it so. This follows up on commit r324182. llvm-svn: 324185
* [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default ↵Eric Fiselier2018-02-044-0/+46
| | | | | | | | | | | | | | | | | | | constructible types. Summary: This patch fixes llvm.org/PR35491 and LWG2157 (https://cplusplus.github.io/LWG/issue2157) The fix attempts to maintain ABI compatibility by replacing the array with a instance of `aligned_storage`. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: lichray, cfe-commits Differential Revision: https://reviews.llvm.org/D41223 llvm-svn: 324182
* Work around GCC constexpr initialization bugEric Fiselier2018-02-031-1/+1
| | | | llvm-svn: 324165
* Fix has_unique_object_representation after Clang commit r324134.Eric Fiselier2018-02-021-2/+4
| | | | | | | | | Clang previously reported an empty union as having a unique object representation. This was incorrect and was fixed in a recent Clang commit. This patch fixes the libc++ tests. llvm-svn: 324153
* Disable test in C++<11 mode due to use of alignas.Richard Smith2018-02-011-0/+2
| | | | llvm-svn: 324033
* Make std::get_temporary_buffer respect overaligned types when possibleRichard Smith2018-02-011-0/+33
| | | | | | | | Patch by Chris Kennelly! Differential Revision: https://reviews.llvm.org/D41746 llvm-svn: 324020
* Remove std::experimental::sample; use std::sample instead. See ↵Marshall Clow2018-02-013-244/+0
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323979
* Remove <experimental/numeric>; use <numeric> instead. See ↵Marshall Clow2018-02-0116-604/+0
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323975
OpenPOWER on IntegriCloud