summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Emit an error when include <atomic> after <stdatomic.h>Volodymyr Sapsai2018-05-151-0/+3
| | | | | | | | | | | | | | | | | | | | | C11 defines `kill_dependency` as a macro in <stdatomic.h>. When you include <atomic> after <stdatomic.h>, the macro clashes with `std::kill_dependency` and causes multiple errors. Explicit error should help in diagnosing those errors. No change for working code that includes <atomic> before <stdatomic.h>. rdar://problem/27435938 Reviewers: rsmith, EricWF, mclow.lists, jfb Reviewed By: jfb Subscribers: jfb, jkorous-apple, christof, bumblebritches57, JonChesterfield, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D45470 llvm-svn: 332413
* Update XFAIL so apple-clang-9.0 is the last version not implementing Core 2094.Volodymyr Sapsai2018-05-141-1/+1
| | | | | | The test is passing with apple-clang-9.1. rdar://problem/40222003 llvm-svn: 332282
* [libcxx] [test] Update msvc_stdlib_force_include.hpp.Stephan T. Lavavej2018-05-111-4/+0
| | | | llvm-svn: 332159
* Fix failing test due to incorrect use of noexceptEric Fiselier2018-05-111-14/+0
| | | | llvm-svn: 332066
* Fix PR37407 - callable traits don't correctly check complete types.Eric Fiselier2018-05-103-143/+39
| | | | | | | | | | | | | Checking for complete types is really rather tricky when you consider the amount of specializations required to check a function type. This specifically caused PR37407 where we incorrectly diagnosed noexcept function types as incomplete (but there were plenty of other cases that would cause this). This patch removes the complete type checking for now. I'm going to look into adding a clang builtin to correctly do this for us. llvm-svn: 332040
* More notes on Rapperswil issuesMarshall Clow2018-05-101-9/+9
| | | | llvm-svn: 332000
* Allow copy elision in path concatenationDavid Bolvansky2018-05-091-1/+3
| | | | | | | | | | | | | | | | | Summary: Just port of libstdc++'s fix to libc++ fs: https://github.com/gcc-mirror/gcc/commit/e6ac4004fe49d785c63bf87aec4b095b5ce1d19f Author of fix: Jonathan Wakely Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: smeenai, christof, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D46593 llvm-svn: 331910
* Revert "Emit an error when mixing <stdatomic.h> and <atomic>"Volodymyr Sapsai2018-05-082-31/+0
| | | | | | | It reverts commit r331379 because turned out `__ALLOW_STDC_ATOMICS_IN_CXX__` doesn't work well in practice. llvm-svn: 331818
* Status updates for RapperswilMarshall Clow2018-05-071-4/+4
| | | | llvm-svn: 331661
* Update for RapperswilMarshall Clow2018-05-071-71/+37
| | | | llvm-svn: 331638
* [libcxx] [test] Fix whitespace, NFC.Stephan T. Lavavej2018-05-051-8/+8
| | | | | | Strip trailing whitespace and untabify. llvm-svn: 331576
* [libcxx] [test] Fix MSVC x64 truncation warning.Stephan T. Lavavej2018-05-051-1/+1
| | | | | | | | warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data Requesting post-commit review. llvm-svn: 331575
* Emit an error when mixing <stdatomic.h> and <atomic>Volodymyr Sapsai2018-05-022-0/+31
| | | | | | | | | | | | | | | | | | | | | Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error explicitly telling about the incompatibility. Introduce the macro `__ALLOW_STDC_ATOMICS_IN_CXX__` that allows to choose in C++ between C atomics and C++ atomics. rdar://problem/27435938 Reviewers: rsmith, EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: jkorous-apple, christof, bumblebritches57, JonChesterfield, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D45470 llvm-svn: 331379
* Fix return type of isinf(double) and isnan(double) where possible.Richard Smith2018-05-012-6/+36
| | | | | | | | | | | When using an old version of glibc, a ::isinf(double) and ::isnan(double) function is provided, rather than just the macro required by C and C++. Displace this function using _LIBCPP_PREFERRED_OVERLOAD where possible. The only remaining case where we should get the wrong return type is now glibc + libc++ + a non-clang compiler. llvm-svn: 331241
* [libcxx] [test] Remove non-portable assertions from filebuf testsBilly Robert O'Neal III2018-04-262-10/+18
| | | | | | | | | | | seekoff.pass.cpp: libc++'s tests are asserting things about the buffer passed to pubsetbuf. [filebuf.virtuals]/12 says that what the filebuf does with the buffer you give it is completely implementation defined. The MSVC++ implementation takes that buffer and hands it off to the CRT (by calling ::setvbuf) and the CRT doesn't necessarily follow the pattern this test wants. This change simply makes asserts against the buffer's contents use LIBCPP_ASSERT instead of assert. pbackfail.pass.cpp: libc++'s tests are asserting about what characters will and will not be available in the putback area. [filebuf.virtuals]/9 says "The function can alter the number of putback positions available as a result of any call." This change LIBCPP_ASSERTS libc++'s behavior, but checks invariants of the putback area independently. llvm-svn: 330999
* Move old test into test/libcxx, and implement new version of test for ↵Marshall Clow2018-04-262-2/+47
| | | | | | ostreambuf_iterator::failed. Fixes PR#37245. Thanks to Billy O'Neill for the bug report. llvm-svn: 330955
* [libcxx] func.wrap.func.con: Unset function before destroying anythingVolodymyr Sapsai2018-04-254-29/+134
| | | | | | | | | | | | | | | | | | | | Be defensive against a reentrant std::function::operator=(nullptr_t), in case the held function object has a non-trivial destructor. Destroying the function object in-place can lead to the destructor being called twice. Patch by Duncan P. N. Exon Smith. C++03 support by Volodymyr Sapsai. rdar://problem/32836603 Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits, arphaman Differential Revision: https://reviews.llvm.org/D34331 llvm-svn: 330885
* Disable the test I just added when testing C++03.Marshall Clow2018-04-251-1/+7
| | | | llvm-svn: 330838
* Fix static initialization of std::atomic_flag; Fixes PR#37226. Thanks to ↵Marshall Clow2018-04-252-1/+8
| | | | | | Ricky Zhou for the report and test case. llvm-svn: 330828
* [libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a ↵Billy Robert O'Neal III2018-04-252-2/+6
| | | | | | | | | | directory" from ios_base::failure tests These io_error asserts that std::errc::is_a_directory has message "Is a directory". On MSVC++ it reports "is a directory" (with a lowercase I). That doesn't matter for the ios_failure component being tested, so just implement in terms of system_category().message(). Reviewed as https://reviews.llvm.org/D45715 llvm-svn: 330791
* Re-commit r330627 "[libcxx] implement <experimental/simd> declarations based ↵Tim Shen2018-04-2313-0/+1950
| | | | | | | | | | | | on P0214R7." There are 3 changes: * Renamed genertor.pass.cpp to generator.pass.cpp * Removed nothing_to_do.pass.cpp * Mark GCC 4.9 as UNSUPPORTED for the test files that have negative narrowing conversion SFINAE test (see GCC PR63723). llvm-svn: 330655
* Revert "[libcxx] implement <experimental/simd> declarations based on P0214R7."Tim Shen2018-04-2314-1956/+0
| | | | | | | | This reverts commit r330627. This causes several bots to freak out. llvm-svn: 330636
* [libcxx] implement <experimental/simd> declarations based on P0214R7.Tim Shen2018-04-2314-0/+1956
| | | | | | | | | | | | | | | Summary: The patch includes all declarations, and also implements the following features: * ABI. * narrowing-conversion related SFIANE, including simd<> ctors and (static_)simd_cast. Reviewers: mclow.lists, EricWF Subscribers: lichray, sanjoy, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D41148 llvm-svn: 330627
* Don't do aligned allocations on MSVCRT before 19.12 (update 15.3)Reid Kleckner2018-04-191-0/+6
| | | | | | | | | | Reviewers: EricWF, pcc Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D45836 llvm-svn: 330372
* Remove impossible _MSC_VER checkReid Kleckner2018-04-191-3/+0
| | | | | | | | | | | | | | | | Summary: It is immediately preceded by this check: #if _MSC_VER < 1900 #error "MSVC versions prior to Visual Studio 2015 are not supported" #endif Reviewers: EricWF Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D45829 llvm-svn: 330360
* support: add missing locale stubs for android L, MSaleem Abdulrasool2018-04-132-5/+38
| | | | | | | | | The strto* family was introduced in android O (API Level 26). However, the support headers were adjusted to indicate that all locale aware functions were added in L. Provide stubs for the locale aware strto* family until O. llvm-svn: 330045
* [CMake] Set the default ABI version for Fuchsia in CMake as wellPetr Hosek2018-04-131-2/+7
| | | | | | | | This is neeeded since the CMake value is used for the SOVERSION. Differential Revision: https://reviews.llvm.org/D45529 llvm-svn: 329983
* [libcxx] [test] Use TEST_IGNORE_NODISCARD.Stephan T. Lavavej2018-04-131-3/+3
| | | | | | Fixes D45595. llvm-svn: 329979
* [libcxx] [test] Fix whitespace, NFC.Stephan T. Lavavej2018-04-1214-71/+71
| | | | | | test/std almost always uses spaces; now it is entirely tab-free. llvm-svn: 329978
* [libcxx] [test] Use TEST_COMPILER_C1XX.Stephan T. Lavavej2018-04-124-9/+13
| | | | | | Also TEST_COMPILER_CLANG in one place. (More could be changed.) llvm-svn: 329977
* [libcxx] [test] Silence MSVC warning C4146.Stephan T. Lavavej2018-04-121-0/+4
| | | | | | | | | | | | | This test code triggers the MSVC warning: "unary minus operator applied to unsigned type, result still unsigned" Although it would be possible to change the test code to avoid this warning, I have chosen to simply silence it. Fixes D45594. llvm-svn: 329976
* [libcxx] [test] Fix nodiscard warnings.Stephan T. Lavavej2018-04-121-3/+3
| | | | | | | | MSVC's STL has marked to_bytes/from_bytes as nodiscard. Fixes D45595. llvm-svn: 329975
* [libcxx] [test] Avoid unary_function.Stephan T. Lavavej2018-04-121-1/+3
| | | | | | | | | | | Replace unary_function inheritance (which was never required, even in C++98) with argument_type and result_type typedefs. This increases portability, as unary_function was removed in C++17 and MSVC has implemented that removal. Fixes D45596. llvm-svn: 329974
* [libcxx] [test] Avoid MSVC truncation warnings.Stephan T. Lavavej2018-04-123-4/+4
| | | | | | | | | | | | | | | | | | | MSVC emits "warning C4244: 'initializing': conversion from 'int' to 'short', possible loss of data" when it sees pair<Whatever, short> constructed from (whatever, 4), because int is being truncated to short within pair's constructor. (The compiler doesn't take into account the fact that 4 is a literal at the callsite; it generates this warning when the constructor is instantiated, because it might be called with a runtime-valued int that would actually truncate.) Instead of static_cast<short>, we can simply change short to int in these tests, without affecting the pair operations that they're trying to test: move assignment, convert copy construction, and convert move construction. Fixes D45016. llvm-svn: 329973
* [libcxx] Set ABI version 2 as default for FuchsiaPetr Hosek2018-04-111-1/+5
| | | | | | | | | | This avoids the need for a custom generated config file which is desired because the custom config files differs per-target which means we cannot reuse headers across different targets. Differential Revision: https://reviews.llvm.org/D45304 llvm-svn: 329770
* [libcxx] [test] Use the correct type from strlen. Include correct header.Billy Robert O'Neal III2018-04-104-7/+10
| | | | llvm-svn: 329665
* [test] [NFC] cleanup aligned_storage testCasey Carter2018-04-091-106/+55
| | | | | | | * `s/"" )/"")/g` * Don't redundantly test triviality for `TEST_STD_VER > 17` llvm-svn: 329618
* Revert "[CMake] Use custom command and target to install libc++ headers"Petr Hosek2018-04-094-239/+40
| | | | | | This reverts commit r329544 which is failing on libcxx standalone bots. llvm-svn: 329545
* [CMake] Use custom command and target to install libc++ headersPetr Hosek2018-04-094-40/+239
| | | | | | | | | | | | | | | | | | | Using file(COPY FILE...) has several downsides. Since the file command is only executed at configuration time, any changes to headers made after the initial CMake execution are ignored. This can lead to subtle errors since the just built Clang will be using stale libc++ headers. Furthermore, since the headers are copied prior to executing the build system, this may hide missing dependencies on libc++ from other LLVM components. This changes replaces the use of file(COPY FILE...) command with a custom command and target which addresses all aforementioned issues and matches the implementation already used by other LLVM components that also install headers like Clang builtin headers. Differential Revision: https://reviews.llvm.org/D44773 llvm-svn: 329544
* [test] Fix Container::insert(value_type const&) testsEric Fiselier2018-04-0810-405/+293
| | | | | | | | | | | Patch from Joe Loser. Several unit tests meaning to test the behavior of lvalue insertion incorrectly pass rvalues. Fixes bug PR # 27394 Reviewed as https://reviews.llvm.org/D44411 llvm-svn: 329541
* [libcxx][test] Silence -Wself-assign diagnosticsRoman Lebedev2018-04-072-7/+7
| | | | | | | | | | | | | | | | | | | | Summary: D44883 extends -Wself-assign to also work on C++ classes. These new warnings pop up in the test suite, so they have to be silenced. Please refer to the D45082 for disscussion on whether this is the right way to solve this. Testing: `ninja check-libcxx check-libcxxabi` in stage-2 build. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D45128 llvm-svn: 329490
* Use void() to create a void expression typeEric Fiselier2018-04-071-1/+1
| | | | llvm-svn: 329484
* Work around missing braces in init warningEric Fiselier2018-04-071-1/+1
| | | | llvm-svn: 329474
* Implement P0768r1: Library support for the Spaceship Operator.Eric Fiselier2018-04-0613-1/+1518
| | | | | | | | | | | | this patch adds the <compare> header and implements all of it except for [comp.alg]. As I understand it, the header is needed by the compiler in when implementing the semantics of operator<=>. For that reason I feel it's important to land this header early, despite all compilers lacking support. llvm-svn: 329460
* Mark <span> as "In progress"Marshall Clow2018-04-061-2/+2
| | | | llvm-svn: 329375
* [coroutines] libcxx, noop_coroutine, make bots even more happyGor Nishanov2018-04-052-4/+3
| | | | llvm-svn: 329245
* [coroutines] libcxx noop_coroutine. Make bots happierGor Nishanov2018-04-041-0/+10
| | | | llvm-svn: 329240
* [coroutines] Allow compilation under c++03Gor Nishanov2018-04-041-1/+1
| | | | llvm-svn: 329239
* [coroutines] Add noop_coroutine to <experimental/coroutine>Gor Nishanov2018-04-042-29/+134
| | | | | | | | | | | | | | A recent addition to Coroutines TS (https://wg21.link/p0913) adds a pre-defined coroutine noop_coroutine that does nothing. This patch implements require library types in <experimental/coroutine> Related clang and llvm patches: https://reviews.llvm.org/D45114 https://reviews.llvm.org/D45120 llvm-svn: 329237
* [libcxx][test] Fix fs::proximate tests on platforms where /net exists.Jan Korous2018-04-041-1/+1
| | | | | | Following Eric's patch. llvm-svn: 329199
OpenPOWER on IntegriCloud