summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental
Commit message (Collapse)AuthorAgeFilesLines
* Mark two coroutine tests as unsupported under ubsan, againVedant Kumar2017-06-022-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r304580, making bool_await_suspend.pass.cpp and generator.pass.cpp unsupported on ubsan again. The host compiler is based on r304329, which has the change from PR33271 (r304277). However, this was not enough to address the issue. Bot Failure: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-ubsan/builds/628 Unknown type! UNREACHABLE executed at /home/eric/full-llvm/llvm/lib/IR/ValueTypes.cpp:287! llvm::EVT::getEVT(llvm::Type*, bool) (/usr/local/bin/clang-5.0+0x17e7a07) llvm::TargetLoweringBase::getValueType(llvm::DataLayout const&, llvm::Type*, bool) const (/usr/local/bin/clang-5.0+0x852c4a) llvm::ComputeValueVTs(llvm::TargetLowering const&, llvm::DataLayout const&, llvm::Type*, llvm::SmallVectorImpl<llvm::EVT>&, llvm::SmallVectorImpl<unsigned long>*, unsigned long) (/usr/local/bin/clang-5.0+0x141b6e9) llvm::SelectionDAGBuilder::visitTargetIntrinsic(llvm::CallInst const&, unsigned int) (/usr/local/bin/clang-5.0+0x237b1ca) clang-5.0: /home/eric/full-llvm/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1236: virtual void llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction *): Assertion `LScopes.getAbstractScopesList().size() == NumAbstractScopes && "ensureAbstractVariableIsCreated inserted abstract scopes"' failed. __assert_fail_base /build/glibc-9tT8Do/glibc-2.23/assert/assert.c:92:0 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) llvm::DwarfDebug::endFunctionImpl(llvm::MachineFunction const*) (/usr/local/bin/clang-5.0+0x223f86b) llvm::DebugHandlerBase::endFunction(llvm::MachineFunction const*) (/usr/local/bin/clang-5.0+0x227a5a1) llvm::AsmPrinter::EmitFunctionBody() (/usr/local/bin/clang-5.0+0x222522f) llvm-svn: 304591
* Revert "Mark two coroutine tests as unsupported under ubsan"Vedant Kumar2017-06-022-6/+0
| | | | | | | This reverts commit r304462, thereby re-enabling two tests under ubsan. We expect these tests to pass now that PR33271 is fixed. llvm-svn: 304580
* [test] Allow non-libc++ coroutine_handle::done to strengthen noexceptCasey Carter2017-06-014-6/+6
| | | | llvm-svn: 304487
* Mark two coroutine tests as unsupported under ubsanVedant Kumar2017-06-012-0/+6
| | | | | | | | | They appear to crash inside of SelectionDAG on some Linux bots, when ubsan is enabled. https://bugs.llvm.org/show_bug.cgi?id=33271 llvm-svn: 304462
* Remove ubsan XFAILS in two testsVedant Kumar2017-06-012-6/+0
| | | | | | | These two tests are ubsan-clean now: http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/3553/ llvm-svn: 304450
* Fix silly mistakes in recent changes made to coroutine testEric Fiselier2017-05-311-4/+2
| | | | llvm-svn: 304364
* Transform the libc++ coroutine shell tests into normal .pass.cpp tests.Eric Fiselier2017-05-3125-107/+15
| | | | | | | | | The shell test versions didn't get all of the flags normal tests do, specifically warning flags. This patch makes them .pass.cpp tests, and uses a lit.local.cfg to add -fcoroutines-ts and to make them UNSUPPORTED when that flag isn't available. llvm-svn: 304351
* [coroutines] Make coroutine_handle<T>::from_address ill-formed for ↵Eric Fiselier2017-05-292-0/+55
| | | | | | | | | | | | | everything but void*. from_address requires that the provided pointer refer to the suspended coroutine, which doesn't have a type, or at least not one knowable by the user. Therefore every use of `from_address` with a typed pointer is almost certainly a bug. This behavior is a part of the TS specification, but hopefully it will be in the future. llvm-svn: 304172
* Fix coroutine test failures caused by API misusages.Eric Fiselier2017-05-293-6/+6
| | | | | | | | More tests to come. I think that from_address overload should be deleted or ill-formed, except for the 'void*' one; The user cannot possibly have a typed pointer to the coroutine state. llvm-svn: 304131
* Correct XFAIL's in coroutine tests to only list ubsanEric Fiselier2017-05-282-9/+10
| | | | llvm-svn: 304106
* Fix use of uninitialized memoryEric Fiselier2017-05-281-1/+1
| | | | llvm-svn: 304105
* XFAIL tests which trigger coroutine debug info crash in ClangEric Fiselier2017-05-282-0/+8
| | | | llvm-svn: 304104
* Add hack to allow test to run w/o C++17 copy elisionEric Fiselier2017-05-281-2/+9
| | | | llvm-svn: 304103
* [coroutines] Add end-to-end tests within libc++Eric Fiselier2017-05-288-0/+809
| | | | | | | | | | | | | This patch adds end-to-end/breathing tests for coroutines into libc++. The tests aren't specifically to test libc++ requirements but instead are intented to ensure coroutines are working fine in general. Although libc++ isn't exactly the most correct place for these tests to live, there is one major advantage. The libc++ test suite is also used by MSVC and by adding the tests here it ensures they will be run against all currently available coroutine implementations. llvm-svn: 304101
* Update more coroutine_handle signatures to reflect N4663.Eric Fiselier2017-05-253-10/+59
| | | | | | | Thanks to Casey Carter for pointing out the out-of-date tests and implementation. llvm-svn: 303900
* Update coroutine_handle<P>::promise to reflect N4663.Eric Fiselier2017-05-251-3/+3
| | | | | | | | | | | This patch updates the promise() member to match the current spec. Specifically it removes the non-const overload and make the return type of the const overload non-const. This patch also makes the ASSERT_NOT_NOEXCEPT tests libc++ specific, since other implementations may be free to strengthen the specification. llvm-svn: 303895
* Add <experimental/coroutine>Eric Fiselier2017-05-2517-0/+1002
| | | | | | | This patch adds the library portions of the coroutines PDTS, which should now be supported by Clang. llvm-svn: 303836
* Fix XFAIL to reflect recent fixes in GCCEric Fiselier2017-05-111-1/+2
| | | | llvm-svn: 302841
* Fix GCC 7 test failures.Eric Fiselier2017-05-091-0/+5
| | | | | | | | | | | This patch fixes the test failures and unexpected passes that occur when testing against GCC 7. Specifically: * don't mark __gcd as always inline because it's a recursive function. GCC diagnoses this. * don't XFAIL the aligned allocation tests. GCC 7 supports them but not the -faligned-allocation option. * Work around gcc.gnu.org/PR78489 in variants constructors. llvm-svn: 302488
* Add markup for libc++ dylib availabilityMehdi Amini2017-05-0415-5/+90
| | | | | | | | | | | | | | | Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
* Diagnose when reverse_iterator is used on path::iterator.Eric Fiselier2017-04-131-7/+5
| | | | | | | | | | | | | | | path::iterator isn't a strictly conforming iterator. Specifically it stashes the current element inside the iterator. This leads to UB when used with reverse_iterator since it requires the element to outlive the lifetime of the iterator. This patch adds a static_assert inside reverse_iterator to disallow "stashing iterator types", and it tags path::iterator as such a type. Additionally this patch removes all uses of reverse_iterator<path::iterator> within the tests. llvm-svn: 300164
* Implement LWG 2787 - [file_status.cons] is inconsistentEric Fiselier2017-03-061-2/+2
| | | | llvm-svn: 297071
* 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
* add tests for ENAMETOOLONGEric Fiselier2017-02-172-9/+25
| | | | llvm-svn: 295390
* Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd.Marshall Clow2017-02-102-3/+3
| | | | llvm-svn: 294798
* Make lcm/gcd work better in edge cases. Fixes a UBSAN failure.Marshall Clow2017-02-102-0/+15
| | | | llvm-svn: 294779
* [test] Fix hard_link_count test to account for fs with dir nlink==1Michal Gorny2017-02-081-4/+8
| | | | | | | | | | Filesystems are not required to maintain a hard link count consistent with number of subdirectories. For example, on btrfs all directories have nlink==1. Account for that in the test. Differential Revision: https://reviews.llvm.org/D29706 llvm-svn: 294431
* [libcxx] [test] Fix comment typos.Stephan T. Lavavej2017-02-051-2/+2
| | | | | | No functional change, no code review. llvm-svn: 294160
* filesystem: fix n4100 conformance for `temp_directory_path`Saleem Abdulrasool2017-02-051-0/+8
| | | | | | | | | N4100 states that an error shall be reported if `!exists(p) || !is_directory(p)`. We were missing the first half of the conditional. Invert the error and normal code paths to make the code easier to follow. llvm-svn: 294127
* Implement LWG2733: [fund.ts.v2] gcd / lcm and bool. We already did tbis for ↵Marshall Clow2017-01-248-0/+200
| | | | | | C++17, so replicate the changes in experimental. llvm-svn: 292962
* [libcxx] [test] Fix comment typos, strip trailing whitespace.Stephan T. Lavavej2017-01-1810-14/+14
| | | | | | No functional change, no code review. llvm-svn: 292434
* Fix filesystem::path assignment from {}Eric Fiselier2017-01-182-0/+50
| | | | | | | | Adding `path::operator=(string_type&&)` made the expression `p = {}` ambiguous. This path fixes that ambiguity by making the `string&&` overload a template so it ranks lower during overload resolution. llvm-svn: 292345
* More configuration changes for running the test suite against MSVC's STLEric Fiselier2017-01-181-0/+3
| | | | llvm-svn: 292337
* Fix last_write_time tests for filesystems that don't support negative and ↵Jonas Hahnfeld2017-01-141-29/+63
| | | | | | | | | | | very large times Seems to be the case for NFS. Original patch by Eric Fiselier! Differential Revision: https://reviews.llvm.org/D22452 llvm-svn: 292013
* [libcxx] [test] Strip trailing whitespace.Stephan T. Lavavej2017-01-045-5/+5
| | | | | | Fixes D27786. llvm-svn: 290922
* Fix some 'FIXME's in the tests.Marshall Clow2016-12-304-18/+10
| | | | llvm-svn: 290758
* Fix unused parameters and variablesEric Fiselier2016-12-2331-68/+55
| | | | llvm-svn: 290459
* Enable the -Wsign-compare warning to better support MSVCEric Fiselier2016-12-113-7/+10
| | | | llvm-svn: 289363
* Refactor uses_allocator test types for upcoming fixesEric Fiselier2016-12-095-0/+23
| | | | llvm-svn: 289197
* Adjust libc++ test infastructure to fully support modulesEric Fiselier2016-12-051-16/+16
| | | | | | | | | | | | This patch overhalls the libc++ test format/configuration in order to fully support modules. By "fully support" I mean get almost all of the tests passing. The main hurdle for doing this is handling tests that `#define _LIBCPP_FOO` macros to test a different configuration. This patch deals with these tests in the following ways: 1. For tests that define single `_LIBCPP_ABI_FOO` macros have been annotated with `// MODULES_DEFINES: _LIBCPP_ABI_FOO`. This allows the test suite to define the macro on the command line so it uses a different set of modules. 2. Tests for libc++'s debug mode (which define custom `_LIBCPP_ASSERT`) are automatically detected by the test suite and are compiled and run with modules disabled. This patch also cleans up how the `CXXCompiler` helper class handles enabling/disabling language features. NOTE: This patch uses `LIT` features which were only committed to LLVM today. If this patch breaks running the libc++ tests you probably need to update LLVM. llvm-svn: 288728
* Enable warnings by default for C++ >= 11 and fix -Wshadow occurancesEric Fiselier2016-12-037-11/+14
| | | | llvm-svn: 288557
* Protect optional test under libcpp-no-exceptionsRoger Ferrer Ibanez2016-12-011-3/+6
| | | | | | | | Replace throw with TEST_THROW and skip tests that throw exceptions Differential Revision: https://reviews.llvm.org/D27254 llvm-svn: 288379
* Implement conjuntion/disjuntion/negation for LFTS v2. Same code and tests ↵Marshall Clow2016-11-263-0/+177
| | | | | | for the ones in std:: llvm-svn: 287988
* Implement the 'detection idiom' from LFTS v2Marshall Clow2016-11-265-0/+224
| | | | llvm-svn: 287981
* [libcxx] [test] D27027: Strip trailing whitespace.Stephan T. Lavavej2016-11-235-5/+5
| | | | llvm-svn: 287829
* Protect std::experimental::optional tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-0713-27/+77
| | | | | | | | | | In these tests there are some paths that explicitly throw, so use the TEST_THROW macro that was proposed for this and then skip the tests that may enter the throwing path. Differential Revision: https://reviews.llvm.org/D26142 llvm-svn: 286099
* [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.Stephan T. Lavavej2016-11-0448-55/+96
| | | | | | | | | | | This replaces every occurrence of _LIBCPP_STD_VER in the tests with TEST_STD_VER. Additionally, for every affected file, #include "test_macros.h" is being added explicitly if it wasn't already there. https://reviews.llvm.org/D26294 llvm-svn: 286007
* Fix non-portable tests for temp_directory_path(...)Eric Fiselier2016-10-241-8/+11
| | | | llvm-svn: 285020
* Fix libc++ specific assertion in permissions(...) testsEric Fiselier2016-10-231-1/+2
| | | | llvm-svn: 284945
* Update status for std::optional LWG issues and fix an optional SFINAE bugEric Fiselier2016-10-161-0/+3
| | | | llvm-svn: 284323
OpenPOWER on IntegriCloud