summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* XFAIL the std::byte tests on a bunch of old clang versions, because they ↵Marshall Clow2017-03-2417-0/+51
| | | | | | don't like 'std::byte b1{1}' llvm-svn: 298706
* Implement P0298R3: 'std::byte'. Reviewed as https://reviews.llvm.org/D31022Marshall Clow2017-03-2418-0/+562
| | | | llvm-svn: 298689
* Implement Pp0156r2: 'Variadic Lock Guard, version 5' Reviewed as ↵Marshall Clow2017-03-2411-114/+145
| | | | | | https://reviews.llvm.org/D31163. llvm-svn: 298681
* Update the algorithm tests to not use the (deprecated) function binders. No ↵Marshall Clow2017-03-237-14/+42
| | | | | | functional change. llvm-svn: 298618
* [libcxx] Improve code generation for vector::clear().Bruce Mitchener2017-03-231-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: By manipulating a local variable in the loop, when the loop can be optimized away (due to no non-trivial destructors), this lets it be fully optimized away and we modify the __end_ separately. This results in a substantial improvement in the generated code. Prior to this change, this would be generated (on x86_64): movq (%rdi), %rdx movq 8(%rdi), %rcx cmpq %rdx, %rcx je LBB2_2 leaq -12(%rcx), %rax subq %rdx, %rax movabsq $-6148914691236517205, %rdx ## imm = 0xAAAAAAAAAAAAAAAB mulq %rdx shrq $3, %rdx notq %rdx leaq (%rdx,%rdx,2), %rax leaq (%rcx,%rax,4), %rax movq %rax, 8(%rdi) And after: movq (%rdi), %rax movq %rax, 8(%rdi) This brings this in line with what other implementations do. Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25241 llvm-svn: 298601
* Use 'REQUIRES: c++98 || c++03 || c++11 || c++14' instead of the deprecated ↵Marshall Clow2017-03-232-2/+2
| | | | | | 'REQUIRES-ANY: c++98, c++03, c++11, c++14' llvm-svn: 298600
* Remove random_shuffle in C++17. Please use shuffle instead. If you have to, ↵Marshall Clow2017-03-233-0/+48
| | | | | | you cant get it back by defining _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE before including any libc++ headers. llvm-svn: 298597
* Silence a couple of 'unused variable' warnings in c++03 tests. No functional ↵Marshall Clow2017-03-232-0/+2
| | | | | | change llvm-svn: 298582
* Worked around GCC bug 56480. Explicit specialization in a different namespace.Michael Park2017-03-232-2/+10
| | | | | | | | | | | | Summary: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480 Reviewers: EricWF Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D31273 llvm-svn: 298581
* Can't test for noexcept on C++03; std::hash<nullptr_t> isn't available until ↵Marshall Clow2017-03-232-0/+8
| | | | | | C++17 llvm-svn: 298580
* Implement P0599: 'noexcept for hash functions'. Fix a couple of hash ↵Marshall Clow2017-03-2314-26/+65
| | | | | | functions (optional<T> and unique_ptr<T>) which were mistakenly marked as 'noexcept'. Reviewed as https://reviews.llvm.org/D31234 llvm-svn: 298573
* Address post-commit review comments regarding test_workarounds.hEric Fiselier2017-03-232-3/+3
| | | | llvm-svn: 298566
* [libc++] Work around C1XX bug which breaks poisoned hash tests.Eric Fiselier2017-03-224-0/+63
| | | | | | | | | | | | | | Summary: This is my attempt to work around the C1XX bug described to me by @BillyONeal. Reviewers: BillyONeal, STL_MSFT, CaseyCarter Reviewed By: BillyONeal Subscribers: cfe-commits, BillyONeal Differential Revision: https://reviews.llvm.org/D31260 llvm-svn: 298554
* Fix a couple of 'C++11'-isms from the last checkin, which broke the '03 bot.Marshall Clow2017-03-212-4/+4
| | | | llvm-svn: 298422
* Add a bit more to one of the chrono testsMarshall Clow2017-03-211-0/+11
| | | | llvm-svn: 298418
* Implement P0548: 'common_type and duration' This involves a subtle change in ↵Marshall Clow2017-03-213-4/+41
| | | | | | the return type of the unary +/- operators for std::chrono::duration, though I expect that no one will notice. llvm-svn: 298416
* Implement LWG#2761: 'basic_string should require that charT match ↵Marshall Clow2017-03-152-1/+25
| | | | | | traits::char_type'. Tests for string_view, too llvm-svn: 297872
* Add deployment knobs to tests (for Apple platforms)Mehdi Amini2017-03-1528-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests for libc++ specify -target on the command-line to the compiler, but this is problematic for a few reasons. Firstly, the -target option isn't supported on Apple platforms. Parts of the triple get dropped and ignored. Instead, software should be compiled with a combination of the -arch and -m<name>-version-min options. Secondly, the generic "darwin" target references a kernel version instead of a platform version. Each platform has its own independent versions (with different versions of libc++.1.dylib), independent of the version of the Darwin kernel. This commit adds support to the LIT infrastructure for testing against Apple platforms using -arch and -platform options. If the host is not on OS X, or the compiler type is not clang or apple-clang, then this commit has NFC. If the host is on OS X and --param=target_triple=... is specified, then a warning is emitted to use arch and platform instead. Besides the warning, there's NFC. If the host is on OS X and *no* target-triple is specified, then use the new deployment target logic. This uses two new lit parameters, --param=arch=<arch> and --param=platform=<platform>. <platform> has the form <name>[<version>]. By default, arch is auto-detected from clang -dumpmachine, and platform is "macosx". If the platform doesn't have a version: For "macosx", the version is auto-detected from the host system using sw_vers. This may give a different version than the SDK, since new SDKs can be installed on older hosts. Otherwise, the version is auto-detected from the SDK version using xcrun --show-sdk-path. -arch <arch> -m<name>-version-min=<version> is added to the compiler flags. The target triple is computed as <arch>-apple-<platform>. It is *not* passed to clang, but it is available for XFAIL and UNSUPPORTED (as is with_system_cxx_lib=<target>). For convenience, apple-darwin and <arch>-apple-darwin are added to the set of available features. There were a number of tests marked to XFAIL on x86_64-apple-darwin11 and x86_64-apple-darwin12. I updated these to x86_64-apple-macosx10.7 and x86_64-apple-macosx10.8. llvm-svn: 297798
* Fixed unintentional assignment-in-assert in new "extending memory management ↵Billy Robert O'Neal III2017-03-146-6/+6
| | | | | | tools" algorithms. llvm-svn: 297772
* Implement LWG2784, and mark 2786, 2795, 2804, 2812, 2826, 2834, 2837 and ↵Marshall Clow2017-03-141-1/+32
| | | | | | 2838 as complete - since we do them already llvm-svn: 297752
* fix test coverage capture dirsEric Fiselier2017-03-111-1/+5
| | | | llvm-svn: 297555
* Fix DoNotOptimize on MSVCEric Fiselier2017-03-111-2/+4
| | | | llvm-svn: 297532
* Implement LWG 2787 - [file_status.cons] is inconsistentEric Fiselier2017-03-061-2/+2
| | | | llvm-svn: 297071
* Remove the buildit and testit scripts; they haven't been supported in yearsEric Fiselier2017-03-031-183/+0
| | | | llvm-svn: 296922
* Fix hash requirements check in __hash_table.Eric Fiselier2017-03-031-2/+36
| | | | | | | | | | | | | | r296565 attempted to add better diagnostics when an unordered container is instantiated with a hash that doesn't meet the Hash requirements. However I mistakenly checked the wrong set of requirements. Specifically it checked if the hash met the requirements for specializations of std::hash. However these requirements are stricter than the generic Hash requirements. This patch fixes the assertions to only check the Hash requirements. llvm-svn: 296919
* Fix libc++ test to pass in C++03 modeMehdi Amini2017-03-032-2/+2
| | | | | | Was hitting: "error: scalar initializer cannot be empty" llvm-svn: 296889
* Clean up more usages of _LIBCPP_HAS_NO_RVALUE_REFERENCESEric Fiselier2017-03-0315-58/+25
| | | | llvm-svn: 296854
* Fix sign-compare warning in test; Oddly this only appears on OS XEric Fiselier2017-03-031-7/+5
| | | | llvm-svn: 296851
* Work around test failure on 32 bit OS XEric Fiselier2017-03-021-6/+13
| | | | llvm-svn: 296840
* remove max_size() extension from polymorphic_allocator. It is unneededEric Fiselier2017-03-021-65/+0
| | | | llvm-svn: 296831
* Fix libc++ test experimental/algorithms/alg.random.sample/sample.pass.cpp ↵Mehdi Amini2017-03-021-5/+9
| | | | | | when ran in c++11 mode 32 bits llvm-svn: 296830
* Fix test failures caused by new/delete calls getting optimized awayEric Fiselier2017-03-025-5/+13
| | | | llvm-svn: 296813
* Remove more usages of REQUIRES-ANY in the test-suiteEric Fiselier2017-03-0217-17/+17
| | | | llvm-svn: 296727
* Recommit r296712: "Fix Apple-specific XFAIL directive in libc++ test"Mehdi Amini2017-03-021-1/+1
| | | | | | | | The test is passing with c++11 and c++14 but not c++1z on this particular version of the compiler. Try to use lit boolean condition to satisfy this constaint. llvm-svn: 296725
* Revert "Fix Apple-specific XFAIL directive in libc++ test"Mehdi Amini2017-03-021-1/+1
| | | | | | | | | | | This reverts commit r296712. It broke our bot. It turns out that the test is passing with c++11 and c++14 but not c++1z on this particular version of the compiler. Since one job is defaulting to c++1z and the other is testing all config I'm not sure how to fix this... llvm-svn: 296724
* Fix Apple-specific XFAIL directive in libc++ testMehdi Amini2017-03-011-1/+1
| | | | | | | | This tests is failing in XCode 7.0. But Xcode 7.3 that shipped an updated clang has this test passing. This is fixing green dragon which runs this configuration. llvm-svn: 296712
* Fix Apple-specific XFAIL directive in libc++ testMehdi Amini2017-03-014-4/+4
| | | | | | | | | These tests are failing in XCode 8.0, 8.1, and 8.2, but not in Xcode 8.3. Annoyingly the version numbering for clang does not follow Xcode and is bumped to 8.1 only in Xcode 8.3. So Xfailing apple-clang-8.0 should catch all cases here. llvm-svn: 296704
* Generate the test configuration even when LIBCXX_INCLUDE_TESTS=OFF.Eric Fiselier2017-03-011-7/+8
| | | | | | | | | | This patch changes the CMake configuration so that it always generates the test/lit.site.cfg file, even when testing is disabled. This allows users to test libc++ without requiring them to have a full LLVM checkout on their machine. llvm-svn: 296685
* Mark test as unsupported in C++11Eric Fiselier2017-03-011-1/+5
| | | | llvm-svn: 296571
* Fix test failures due to bad test hasherEric Fiselier2017-03-0118-0/+24
| | | | llvm-svn: 296568
* Improve diagnostics when an invalid hash is used in an unordered container.Eric Fiselier2017-03-011-0/+32
| | | | | | | | | This patch adds a static assertion that the specified hash meets the requirements of an enabled hash, and it ensures that the static assertion is evaluated before __compressed_pair is instantiated. That way the static assertion diagnostic is emitted first. llvm-svn: 296565
* Fix PR32097 - is_abstract doesn't work on class templates.Eric Fiselier2017-03-011-0/+10
| | | | | | | | | | This patch fixes llvm.org/PR32097 by using the __is_abstract builtin type-trait instead of the previous library-only implementation. All supported compilers provide this trait. I've tested as far back as Clang 3.2, GCC 4.6 and MSVC trunk. llvm-svn: 296561
* Updated the XFAIL comment in variant tests.Michael Park2017-03-012-2/+8
| | | | | | | | | | | | | | Summary: `ConstexprTestTypes::NoCtors` is an aggregate type (and consequently a literal type) in C++17, but not in C++14 since it has a base class. This patch updates the comment to accurately describe the reason for the XFAIL. Reviewers: EricWF Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D30481 llvm-svn: 296558
* Remove XFAIL in implicit_deduction_guides testsSteven Wu2017-02-272-8/+0
| | | | | | | | The clang assertion causing these tests failing with sanitizer is fixed in r295794. All the bots running libcxx tests should be upgraded and running the compiler with the fix. llvm-svn: 296385
* Fix cmake dependency for the external-thread-library variant. NFC.Asiri Rathnayake2017-02-271-1/+1
| | | | llvm-svn: 296338
* test: silence warnings on clang under clang-clSaleem Abdulrasool2017-02-181-1/+1
| | | | | | | When running under clang-cl mode, we do not define `__GNUC__`, resulting in the test failing. llvm-svn: 295560
* test: explicitly size enumerationSaleem Abdulrasool2017-02-181-1/+1
| | | | | | | On certain targets, enumerations may be smaller than an `unsigned long`. Use an explicitly sized enumeration. llvm-svn: 295558
* Update all bug URL's to point to https://bugs.llvm.org/...Eric Fiselier2017-02-1727-32/+32
| | | | llvm-svn: 295434
* Remove dead code in testEric Fiselier2017-02-171-2/+0
| | | | llvm-svn: 295423
* add implicit deduction guide tests for string_viewEric Fiselier2017-02-171-0/+71
| | | | llvm-svn: 295422
OpenPOWER on IntegriCloud