summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Second part of P0482 - char8_t. Reviewed as https://reviews.llvm.org/D55308Marshall Clow2018-12-1180-101/+1002
| | | | llvm-svn: 348828
* Revert "[pair] Mark constructors as conditionally noexcept"Louis Dionne2018-12-119-366/+45
| | | | | | | This broke the tests on Linux. Reverting until I find out why the tests are broken (tomorrow). llvm-svn: 348825
* [pair] Mark constructors as conditionally noexceptLouis Dionne2018-12-119-45/+366
| | | | | | | | | | | | | | | | | | | | | | | Summary: std::tuple marks its constructors as noexcept when the corresponding memberwise constructors are noexcept too -- this commit improves std::pair so that it behaves the same. Note: I did not add support in the explicit and non-explicit `pair(_Tuple&& __p)` constructors because those are non-standard extensions, and supporting them properly is tedious (we have to copy the rvalue-referenceness of the deduced _Tuple&& onto the result of tuple_element). <rdar://problem/29537079> Reviewers: mclow.lists, EricWF Subscribers: christof, llvm-commits Differential Revision: https://reviews.llvm.org/D48669 llvm-svn: 348824
* Update a couple of vector<bool> tests that were testing libc++-specific ↵Marshall Clow2018-12-073-10/+17
| | | | | | bahavior. Thanks to Andrey Maksimov for the catch. llvm-svn: 348660
* [libcxx] Remove the availability_markup LIT featureLouis Dionne2018-12-0710-51/+51
| | | | | | | It is now equivalent to the 'availability' LIT feature, so there's no reason to keep both. llvm-svn: 348653
* [libc++] Improve diagnostics for non-const comparators and hashers in ↵Louis Dionne2018-12-062-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | associative containers Summary: When providing a non-const-callable comparator in a map or set, the warning diagnostic does not include the point of instantiation of the container that triggered the warning, which makes it difficult to track down the problem. This commit improves the diagnostic by placing it directly in the body of the associative container. The same change is applied to unordered associative containers, which had a similar problem. Finally, this commit cleans up the forward declarations of several map and unordered_map helpers, which are not needed anymore. <rdar://problem/41370747> Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48955 llvm-svn: 348529
* [libcxx] Fix incorrect XFAILs for chrono tests on old macos deployment targetsLouis Dionne2018-12-063-9/+12
| | | | | | | | | | | | The tests were marked to fail based on the 'availability' LIT feature. However, those tests should really only be failing when we run them against the dylibs that were deployed on macosx10.7 and macosx10.8, which the deployment target has nothing to do with. This caused the tests to unexpectedly pass when running the tests with deployment target macosx10.{7,8} but running with a recent dylib. llvm-svn: 348520
* [libcxx] Add checks for unique value of array<T, 0>.begin() and array<T, ↵Louis Dionne2018-12-061-1/+8
| | | | | | | | | | | | | | | 0>.end() The standard section [array.zero] requires the return value of begin() and end() methods of a zero-sized array to be unique. Eric Fiselier clarifies: "That unique value cannot be null, and must be properly aligned". This patch adds checks for the first part of this clarification: unique value returned by these methods cannot be null. Reviewed as https://reviews.llvm.org/D55366. Thanks to Andrey Maksimov for the patch. llvm-svn: 348509
* [libcxx] Add XFAILs for aligned allocation tests on AppleClang 9Louis Dionne2018-12-068-96/+96
| | | | | | Some people are still running the test suite using AppleClang 9. llvm-svn: 348507
* [libcxx] Make return value of array<T, 0>.data() checked only for libc++Louis Dionne2018-12-062-6/+6
| | | | | | | | | | | The section array.zero says: "The return value of data() is unspecified". This patch marks all checks of the array<T, 0>.data() return value as libc++ specific. Reviewed as https://reviews.llvm.org/D55364. Thanks to Andrey Maksimov for the patch. llvm-svn: 348485
* [libcxx] Mark some tests as failing on macosx 10.14Louis Dionne2018-12-064-0/+4
| | | | llvm-svn: 348437
* [libcxx] Don't depend on availability markup to provide the streams in the dylibLouis Dionne2018-12-0612-27/+8
| | | | | | | | | | | | Whether an explicit instantiation declaration should be provided is not a matter of availability markup. This problem is exemplified by the fact that some tests were incorrectly marked as XFAIL when they should instead have been using the definition of streams from the headers, and hence passing, and that, regardless of whether visibility annotations are enabled. llvm-svn: 348436
* [libcxx] Implement P0318: unwrap_ref_decay and unwrap_referenceLouis Dionne2018-12-032-0/+109
| | | | | | | | | | | | | | | | | | Summary: This was voted into C++20 in San Diego. Note that there was a revision D0318R2 which did include unwrap_reference_t, but we mistakingly voted P0318R1 into the C++20 Working Draft (which does not include unwrap_reference_t). This patch implements D0318R2, which is what we'll end up with in the Working Draft once this mistake has been fixed. Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54485 llvm-svn: 348138
* First part of P0482 - Establish that char8_t is an integral type, and that ↵Marshall Clow2018-11-2933-0/+168
| | | | | | numeric_limits<char8_t> is valid and sane. (second try) llvm-svn: 347930
* [libcxx] Make UNSUPPORTED for std::async test more fine grainedLouis Dionne2018-11-291-1/+8
| | | | | | | | The test was previously marked as unsupported on all Apple platforms, when we really just want to mark it as unsupported for previously shipped dylibs on macosx. llvm-svn: 347920
* Revert commit r347904 because it broke older compilersMarshall Clow2018-11-2933-168/+0
| | | | llvm-svn: 347908
* First part of P0482 - Establish that char8_t is an integral type, and that ↵Marshall Clow2018-11-2933-0/+168
| | | | | | numeric_limits<char8_t> is valid and sane. llvm-svn: 347904
* [libcxx] Remove bad_array_lengthLouis Dionne2018-11-291-37/+0
| | | | | | | | | | | | | | | | Summary: std::bad_array_length was added by n3467, but this never made it into C++. This commit removes the definition of std::bad_array_length from the headers AND from the shared library. See the comments in the ABI changelog for details about the ABI implications of this change. Reviewers: mclow.lists, dexonsmith, howard.hinnant, EricWF Subscribers: christof, jkorous, libcxx-commits Differential Revision: https://reviews.llvm.org/D54804 llvm-svn: 347903
* [libcxx] More fixes to XFAILs for aligned allocation tests for macosx 10.13Louis Dionne2018-11-292-2/+12
| | | | | | Those tests are a real pain to tweak. llvm-svn: 347875
* Revert "Move internal usages of `alignof`/`__alignof` to use ↵Eric Fiselier2018-11-284-45/+9
| | | | | | | | | | | `_LIBCPP_ALIGNOF`. " This reverts commit 087f065cb0c7463f521a62599884493aaee2ea12. The tests were failing on 32 bit builds, and I don't have time to clean them up right now. I'll recommit tomorrow with fixed tests. llvm-svn: 347816
* Fix bad _LIBCPP_ALIGNOF testEric Fiselier2018-11-281-1/+0
| | | | llvm-svn: 347790
* Implement P0966 - string::reserve should not shrinkMarshall Clow2018-11-281-1/+8
| | | | llvm-svn: 347789
* Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`. Eric Fiselier2018-11-284-9/+46
| | | | | | | | | | | | | | | | | | | | | Summary: Starting in Clang 8.0 and GCC 8.0, `alignof` and `__alignof` return different values in same cases. Specifically `alignof` and `_Alignof` return the minimum alignment for a type, where as `__alignof` returns the preferred alignment. libc++ currently uses `__alignof` but means to use `alignof`. See llvm.org/PR39713 This patch introduces the macro `_LIBCPP_ALIGNOF` so we can control which spelling gets used. This patch does not introduce any ABI guard to provide the old behavior with newer compilers. However, if we decide that is needed, this patch makes it trivial to implement. I think we should commit this change immediately, and decide what we want to do about the ABI afterwards. Reviewers: ldionne, EricWF Reviewed By: EricWF Subscribers: christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D54814 llvm-svn: 347787
* [libcxx] Remove dynarrayLouis Dionne2018-11-2816-840/+0
| | | | | | | | | | | | | | Summary: std::dynarray had been proposed for C++14, but it was pulled out from C++14 and there are no plans to standardize it anymore. Reviewers: mclow.lists, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D54801 llvm-svn: 347783
* [libcxx] Use clang-verify in the lit test suite even when availability is ↵Louis Dionne2018-11-283-0/+12
| | | | | | enabled llvm-svn: 347780
* Implement P1085R2 - Should Span be Regular?. This consists entirely of deletionsMarshall Clow2018-11-276-950/+0
| | | | llvm-svn: 347672
* Add basic_string::__resize_default_init (from P1072)Eric Fiselier2018-11-261-0/+63
| | | | | | | | | | | This patch adds an implementation of __resize_default_init as described in P1072R2. Additionally, it uses it in filesystem to demonstrate its intended utility. Once P1072 lands, or if it changes it's interface, I will adjust the internal libc++ implementation to match. llvm-svn: 347589
* [libcxx] Fix XFAILs for aligned allocation testsLouis Dionne2018-11-268-132/+152
| | | | | | | | | | In r339743, I marked several aligned allocation tests as downright unsupported on macosx in an attempt to unbreak the build. It turns out that marking them as unuspported whenever we're on OS X is way too coarse grained. This commit marks the tests as XFAIL with more granularity. llvm-svn: 347585
* [libcxx] Fix XFAIL for aligned deallocation test with trunk ClangLouis Dionne2018-11-261-6/+15
| | | | | | | | | | | The test was marked as failing whenever the deployment target was 10.12 or older, but in reality the test passes when the deployment target is 10.12 on recent Clangs. This happens because only older clangs do not honor the -faligned-allocation flag, which disables any availability error related to aligned allocation support, regardless of the deployment target. llvm-svn: 347580
* [libcxx] Use a type that is always an aggregate in variant's testsLouis Dionne2018-11-263-25/+28
| | | | | | | | | | | | | | | | | | | | | Summary: In PR39232, we noticed that some variant tests started failing in C++2a mode with recent Clangs, because the rules for literal types changed in C++2a. As a result, a temporary fix was checked in (enabling the test only in C++17). This commit is what I believe should be the long term fix: I removed the tests that checked constexpr default-constructibility with a weird type from the tests for index() and valueless_by_exception(), and instead I added tests for those using an obviously literal type in the test for the default constructor. Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith, arphaman, libcxx-commits, rsmith Differential Revision: https://reviews.llvm.org/D54767 llvm-svn: 347568
* [NFC] Fix typo in commentLouis Dionne2018-11-222-2/+2
| | | | llvm-svn: 347477
* [libcxx] Reintroduce UNSUPPORTED annotation for strstreambuf overflow testLouis Dionne2018-11-221-0/+4
| | | | | | | | | | | This is a revert of r347421, except I'm using the with_system_cxx_lib lit feature instead of availability to mark the test as unsupported (because the problem is a bug in the dylib itself). In r347421, I said I wasn't able to reproduce the issue and that's why I was removing it: this was because I ran lit slightly wrong. The problem mentioned really exists. llvm-svn: 347475
* [libcxx] Add XFAIL for test on OS X 10.12 to 10.14Louis Dionne2018-11-221-0/+6
| | | | llvm-svn: 347473
* [libcxx] Remove incorrect XFAIL on macos 10.12Louis Dionne2018-11-221-1/+0
| | | | llvm-svn: 347461
* [libcxx] Fix incorrect iterator type in vector container testLouis Dionne2018-11-211-24/+32
| | | | | | | | | | | | The iterator types for different specializations of containers with the same element type but different allocators are not required to be convertible. This patch makes the test to take the iterator type from the same container specialization as the created container. Reviewed as https://reviews.llvm.org/D54806. Thanks to Andrey Maksimov for the patch. llvm-svn: 347423
* [libcxx] Mark strstreams tests as being supported on all OS X versionsLouis Dionne2018-11-211-4/+0
| | | | | | | | | | | | | | | I wasn't able to reproduce the issue referred to by the comment using the libc++'s shipped with mac OS X 10.7 and 10.8, so I assume this may have been fixed in a function that is now shipped in the headers. In that case, the tests will pass no matter what dylib we're using. In the worst case, some test bots will start failing and I'll understand why I was wrong, and I can create an actual lit feature for it. Note that I could just leave this test alone, but this change is on the path towards eradicating vendor-specific availability markup from the test suite. llvm-svn: 347421
* Fix missing includes in test headerEric Fiselier2018-11-211-5/+6
| | | | llvm-svn: 347416
* [libc++] Implement P0487R1 - Fixing operator>>(basic_istream&, CharT*)Zhihao Yuan2018-11-213-0/+77
| | | | | | | | | | | | | | | | | | | Summary: Avoid buffer overflow by replacing the pointer interface with an array reference interface in C++2a. Tentatively ready on Batavia2018. https://wg21.link/lwg2499 https://wg21.link/p0487 Reviewers: mclow.lists, ldionne, EricWF Reviewed By: ldionne Subscribers: libcxx-commits, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D51268 llvm-svn: 347377
* [NFC] Rename lit feature to '-fsized-deallocation' for consistencyLouis Dionne2018-11-212-2/+2
| | | | | | | The '-faligned-allocation' flag uses a feature with the same name (with a leading dash). llvm-svn: 347367
* A couple of tests were broken when clang implemented the compiler parts of ↵Marshall Clow2018-11-202-0/+34
| | | | | | P0482 (support for char8_t). Comment out those bits until we implement the corresponding bits in libc++ llvm-svn: 347360
* Mark P0771 as complete; we already did this - I just added tests to be sureMarshall Clow2018-11-201-1/+13
| | | | llvm-svn: 347343
* [NFC][libcxx] Fix incorrect commentsLouis Dionne2018-11-191-3/+3
| | | | llvm-svn: 347267
* [libcxx] Fix XFAIL for GCC 4.9Louis Dionne2018-11-191-1/+1
| | | | | | | | | The XFAIL started passing since we're only testing for trivial-copyability of reference_wrapper in C++14 and above. This commit constrains the XFAIL to gcc-4.9 with C++14 (it would also fail on C++17 and above, but those standards are not available with GCC 4.9). llvm-svn: 347264
* [libcxx] Update test of trivial copyability of reference_wrapperLouis Dionne2018-11-191-3/+4
| | | | | | N4151 is not an extension anymore, it was standardized in C++14. llvm-svn: 347263
* [libcxx] Fix incorrect #include for std::hashLouis Dionne2018-11-191-1/+1
| | | | | | | Reviewed as https://reviews.llvm.org/D54705. Thanks to Andrey Maksimov for the patch. llvm-svn: 347233
* [libcxx] Add missing <cstddef> includes in testsLouis Dionne2018-11-193-0/+4
| | | | | | | | | | | Some tests use type std::max_align_t, but don't include <cstddef> header directly. As a result, these tests won't compile against some conformant libraries. Reviewed as https://reviews.llvm.org/D54645. Thanks to Andrey Maksimov for the patch. llvm-svn: 347232
* [libcxx] Add availability markup for bad_optional_access, bad_variant_access ↵Louis Dionne2018-11-1946-240/+325
| | | | | | | | | | | | and bad_any_cast Reviewers: dexonsmith, EricWF Subscribers: christof, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D53256 llvm-svn: 347219
* [libcxx] Add missing includes in testsLouis Dionne2018-11-1621-0/+24
| | | | | | | | | | | | | | | A bunch of unordered containers tests call library functions but don't directly include the corresponding header files: - fabs() (defined in <cmath> which is not included); - is_permutation() (defined in <algorithm> which is not included); - next() (defined in <iterator> which is not included). - As a result, these tests won't compile against some conformant libraries. Reviewed as https://reviews.llvm.org/D54643. Thanks to Andrey Maksimov for the patch. llvm-svn: 347085
* Work around C++03 decltype limitationsEric Fiselier2018-11-151-5/+5
| | | | llvm-svn: 346917
* Get tests compiling with -Wunused-local-typedefEric Fiselier2018-11-1550-91/+22
| | | | llvm-svn: 346914
OpenPOWER on IntegriCloud