summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement filesystem::perm_options specified in NB comments.Eric Fiselier2018-03-264-41/+55
| | | | | | | | | | 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-26107-233/+173
| | | | | | | | | | | | | | | 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
* [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
* 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
* 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
* 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
* Remove <experimental/any>; use <any> instead. See ↵Marshall Clow2018-02-0120-1822/+0
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323972
* Remove <experimental/optional>; use <optional> instead. See ↵Marshall Clow2018-02-0166-4317/+0
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 323971
* Add error code handling to remove_all testEkaterina Vaartis2018-01-121-1/+1
| | | | | | As mentioned by EricWF in revision D41830 llvm-svn: 322351
* Make std::experimental::filesystem::remove and remove_all return false or 0 ↵Ekaterina Vaartis2018-01-112-3/+27
| | | | | | | | if the file doesn't exist Differential Revision: https://reviews.llvm.org/D41830 llvm-svn: 322293
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2017-12-071-1/+1
| | | | llvm-svn: 319994
* More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in ↵Marshall Clow2017-11-162-1/+30
| | | | | | filesystem::path llvm-svn: 318378
* Implement LWG 3013 - some filesystem members should not be noexcept.Eric Fiselier2017-10-306-21/+32
| | | | | | | | | | | | | | | LWG 3013 points out that the constructors and increment members of the directory iterators need to allocate, and therefore cannot be marked noexcept. It also points out that `is_empty` and `copy` likely need to allocate as well, and as such can also not be noexcept. This patch speculatively implements the resolution removing noexcept, because libc++ does indeed have the possibility of throwing on allocation failure. llvm-svn: 316941
* Fix PR35078 - recursive directory iterator's increment method throws ↵Eric Fiselier2017-10-301-0/+246
| | | | | | | | | | | | | | incorrectly. The guts of the increment method for recursive_directory_iterator was failing to pass an error code object to calls to status/symlink_status, which can throw under certain conditions. This patch fixes the issues by correctly propagating the error codes. However the noexcept still needs to be removed from the signature, as mentioned in LWG 3014, but that change will be made in a separate commit. llvm-svn: 316939
* Fix last_write_time.pass.cpp to work with clang-3.9 and earlierRoman Lebedev2017-10-151-0/+2
| | | | | | At least with clang-3.9 and earlier, -Wunknown-pragmas is also needed. llvm-svn: 315882
* Really do make sure that last_write_time.pass.cpp still works with old clangRoman Lebedev2017-10-151-2/+6
| | | | | | | I *did* try to check that such kind of an issue was not introduced by the rL315874, but clearly i failed to finish verification. llvm-svn: 315876
* Silence clang's -Wtautological-constant-compare in last_write_time.pass.cppRoman Lebedev2017-10-151-0/+22
| | | | | | | Previously this broke the builders, when D38101 was committed. Silence the warning so that it can be re-landed. llvm-svn: 315874
* Placate unused variable warnings uncovered by improvements to clang's ↵Benjamin Kramer2017-10-142-0/+2
| | | | | | -Wunused-variable llvm-svn: 315809
* Fix failing -verify tests due to change in Clangs static_assert message.Eric Fiselier2017-09-173-10/+10
| | | | | | | | Clang recently changed the way it outputs static assert diagnostics. This patch fixes libc++'s -verify tests so they tolerate both the old and new message format. llvm-svn: 313499
* [libcxx] [test] Change comments to say C++ instead of c++. NFC.Stephan T. Lavavej2017-07-291-1/+1
| | | | | | | | This makes them consistent (many comments already used uppercase). The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change. llvm-svn: 309468
* [libcxx] [test] Make files consistently end with newlines, NFC.Stephan T. Lavavej2017-07-292-2/+2
| | | | llvm-svn: 309465
* [libcxx] [test] Untabify, NFC.Stephan T. Lavavej2017-07-298-102/+102
| | | | llvm-svn: 309464
* Fix equivalent test on OS X and FreeBSDEric Fiselier2017-07-051-7/+7
| | | | llvm-svn: 307119
* Implement LWG 2937 - equivalent("dne", "exists") is not an errorEric Fiselier2017-07-051-51/+75
| | | | | | | | | | | | | | This patch speculatively implements the PR for LWG 2937, which fixes two issues with equivalent. (1) It makes equivalent("dne", "exists") an error. Previously only equivalent("dne", "dne") was an error and the former case was not (it returned false). Now equivalent reports an error when either input doesn't exist. (2) It makes equivalent(p1, p2) well-formed when `is_other(p1) && is_other(p2)`. Previously this was an error, but there is seemingly no reason why it should be on POSIX system. llvm-svn: 307117
* any: Add availability for experimental::bad_any_castDuncan P. N. Exon Smith2017-06-188-48/+8
| | | | | | | | As a follow up to r302172, add missing availability for bad_any_cast. rdar://problem/32161524 llvm-svn: 305647
* Allow coroutine_handle<const T> to support creation from const references to ↵Eric Fiselier2017-06-161-0/+35
| | | | | | | | | | | | | | | the promise_type It seems conceivable that a user would need to get a coroutine handle having only a const reference to the promise_type, for example from within a const member function of the promise. This patch allows that use case. A coroutine_handle<const T> can be used in essentially the same way a coroutine_handle<T>, ie to start and destroy the coroutine. The constness of the promise doesn't/shouldn't propagate to the handle. llvm-svn: 305536
* 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
OpenPOWER on IntegriCloud