Commit Graph

4452 Commits

Author SHA1 Message Date
Billy Robert O'Neal III
b68e9c13a0 Automated trailing whitespace removal by VS Code.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321850 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-05 01:31:55 +00:00
Billy Robert O'Neal III
5de0f33bc6 Add move-only types test to transform_reduce iter iter iter init op op.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321849 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-05 01:31:52 +00:00
Billy Robert O'Neal III
519485521a Add move-only types test for transform_reduce bop/uop.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321848 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-05 01:31:50 +00:00
Billy Robert O'Neal III
4436c8cd83 Fix nonstandard bits in transform_reduce_iter_iter_init_bop_uop.
* _VSTD should be std.
* <utility> is needed for forward.
* unary_function is no longer standard (and unnecessary for this, a C++17-only test)

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321847 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-05 01:31:47 +00:00
Hans Wennborg
ac3c89d6a3 Update version to 7.0.0svn: cmake, include files and docs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321725 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-03 15:40:29 +00:00
Marshall Clow
3e653d6c9b Mark LWG2824 as complete. We already did it, but I added a test to be sure
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321689 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-03 04:37:30 +00:00
Marshall Clow
1fb741dfe2 Mark issue #2866 as "nothing to do"
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321687 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-03 03:43:32 +00:00
Marshall Clow
73d6c99b8b Implement p0258r2: has_unique_object_representations
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321685 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-03 02:32:28 +00:00
Marshall Clow
97adf8a38e One more (should be) inline variable that is defined in the dylib
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321666 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-02 19:23:30 +00:00
Marshall Clow
4e498577b5 Un-inline a few more variables that are exported from the dylib.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321664 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-02 19:01:45 +00:00
Marshall Clow
136dc563ad Temporarily revert the inlining of 'piecewise_construct' because it is exported from the dylib.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321663 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-02 18:57:47 +00:00
Marshall Clow
c1ab13d9df A couple more inlined variables that I missed the first time
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321661 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-02 18:41:01 +00:00
Marshall Clow
c58e4723e7 Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321658 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-02 17:17:01 +00:00
Jonathan Roelofs
05e705f9ec Try again, this time with the correct address
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321570 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-29 19:26:53 +00:00
Jonathan Roelofs
6f953342d5 Update CREDITS.txt with personal email
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321563 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-29 19:15:20 +00:00
Don Hinton
14d7b698bf [libcxx] Suppress unused warning on apple.
Summary:
This warning is already suppressed on non-apple platforms, so
this change just suppresses it on apple as well.

Reviewers: EricWF, lichray

Reviewed By: lichray

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D41248

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321435 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-25 05:33:42 +00:00
Marshall Clow
de0811ac71 Fix the definitions of 'reference' and 'pointer' in string_view that no one uses :-). Thanks to K-ballo for the catch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321188 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20 16:31:40 +00:00
Peter Collingbourne
4b54e0fc2a libcxx: Fix for basic_stringbuf::seekoff() after r320604.
As a result of this change, the basic_stringbuf constructor that
takes a mode ends up leaving __hm_ set to 0, causing the comparison
"__hm_ - __str_.data() < __noff" in seekoff() to succeed, which caused
the function to incorrectly return -1. The fix is to account for the
possibility of __hm_ being 0 when computing the distance from __hm_
to the start of the string.

Differential Revision: https://reviews.llvm.org/D41319

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321124 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19 23:33:16 +00:00
Sam Clegg
5638e7b9c4 [libcxx] Add WebAssembly support
It turns out that this is the only change required in libcxx
for it to compile with the new `wasm32-unknown-unknown-wasm`
target recently added to Clang.

Patch by Nicholas Wilson!

Differential Revision: https://reviews.llvm.org/D41073

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16 18:59:50 +00:00
Zhihao Yuan
4159a369fe [libcxx] Fix basic_stringbuf constructor
Summary:
[libcxx] Fix basic_stringbuf constructor

The C++ Standard [stringbuf.cons]p1 defines the effects of the basic_stringbuf
constructor that takes ios_base::openmode as follows:
  Effects: Constructs an object of class basic_stringbuf, initializing the
  base class with basic_streambuf(), and initializing mode with which.
  Postconditions: str() == "".

The default constructor of basic_streambuf shall initialize all its
pointer member objects to null pointers [streambuf.cons]p1.

Currently libc++ calls "str(string_type());" in the aforementioned constructor
setting basic_streambuf's pointers to a non-null value.

This patch removes the call (note that the postcondition str() == ""
remains valid because __str_ is default-initialized) and adds a test checking
that the basic_streambuf's pointers are null after construction.

Thanks Mikhail Maltsev for the patch.

Reviewers: EricWF, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D40707

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320604 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 18:12:55 +00:00
Stephan T. Lavavej
851ea6e01a [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.
benchmarks/util_smartptr.bench.cpp
Change CRLF to LF.

test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
Consistently comment "\u20ac" as EURO SIGN, its Unicode name, instead of the actual Unicode character.

test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp
Avoid non-ASCII dash.

Fixes D40991.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320536 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 00:51:31 +00:00
Stephan T. Lavavej
dd2a900c0b [libcxx] [test] Fix MSVC warnings, null pointer deref.
test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
Silence MSVC warning C4244. This is expected when passing
floating-point values for size.

test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
Avoid MSVC "warning C4293: '<<': shift count negative or too big,
undefined behavior". MSVC sees (1ULL << N) and warns - being guarded
by const bool canFit is insufficient. A small change to the code
avoids the warning without the need for a pragma.

Remove a spurious printf() declaration from to_ullong.pass.cpp.

Change ULL to UL in to_ulong.pass.cpp. The ULL suffix was
probably copy-pasted.

test/std/utilities/tuple/tuple.general/ignore.pass.cpp
Use LIBCPP_STATIC_ASSERT for consistency with other files.

test/support/container_test_types.h
Fix a null pointer dereference, found by MSVC /analyze
warning C6011 "Dereferencing NULL pointer 'm_expected_args'."

Fixes D41030.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320535 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 00:51:27 +00:00
Zhihao Yuan
e445521637 [libcxx] P0604, invoke_result and is_invocable
Summary:
Introduce a new form of `result_of` without function type encoding.

Rename and split `is_callable/is_nothrow_callable` into `is_invocable/is_nothrow_invocable/is_invocable_r/is_nothrow_invocable_r` (and associated types accordingly)

Change function type encoding of previous `is_callable/is_nothrow_callable` traits to conventional template type parameter lists.


Reviewers: EricWF, mclow.lists, bebuch

Reviewed By: EricWF, bebuch

Subscribers: lichray, bebuch, cfe-commits

Differential Revision: https://reviews.llvm.org/D38831

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320509 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-12 18:42:04 +00:00
Casey Carter
5f7683b2d2 workaround PR 28385 in __find_exactly_one_checked
Fixes #35578.

Differential Revision: D41048

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320500 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-12 17:22:24 +00:00
Roger Ferrer Ibanez
4a3242f1dc [libcxx] Define istream_iterator equality comparison operators out-of-line
Currently libc++ defines operator== and operator!= as friend functions in the
definition of the istream_iterator class template. Such definition has a subtle
difference from an out-of-line definition required by the C++ Standard: these
functions can only be found by argument-dependent lookup, but not by qualified
lookup.

This patch changes the definition, so that it conforms to the C++ Standard and
adds a check involving qualified lookup to the test suite.

Patch contributed by Mikhail Maltsev.

Differential Revision: https://reviews.llvm.org/D40415



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320363 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-11 13:54:58 +00:00
Shoaib Meenai
a75f2f1e3c [libc++] Unbreak Apple buildbots
These buildbots are using the deprecated target name install-libcxx-headers
instead of the more up to date install-cxx-headers, so I need to add an
install-libcxx-headers-stripped target to satisfy them.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@320201 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08 21:50:32 +00:00
Stephan T. Lavavej
8148a70b20 [libcxx] [test] Strip trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319994 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-07 00:50:23 +00:00
Shoaib Meenai
cd9466e36f [libc++] Create install-stripped targets
LLVM is gaining install-*-stripped targets to perform stripped installs,
and in order for this to be useful for install-distribution, all
potential distribution components should have stripped installation
targets. LLVM has a function to create these install targets, but since
we can't use LLVM CMake functions in libc++, let's do it manually.

Differential Revision: https://reviews.llvm.org/D40680

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319959 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-06 21:03:42 +00:00
Saleem Abdulrasool
c945ad4df0 Enable auto-linking on Windows
The MSVC driver and clang do not link against the C++ runtime
explicitly.  Instead, they rely on the auto-linking via the pragma
(through `use_ansi.h`) to link against the correct version of the C++
runtime.  Attempt to do something similar here so that linking real C++
code on Windows does not require the user to explicitly specify
`c++.lib` when using libc++ as a C++ runtime on windows.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319816 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 19:32:49 +00:00
Shoaib Meenai
54b78ffabb [libcxx] Fix intrinsics for MSVC
The parameter was previously renamed but MSVC path was not updated.

Patch by Andrey Khalyavin.

Differential Revision: https://reviews.llvm.org/D40774

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319802 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 17:46:23 +00:00
Marshall Clow
ab7cb215b0 Mark a couple of internal routines as 'noexcept'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319779 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 15:56:26 +00:00
Marshall Clow
df68ebc39b Land D28253 which fixes PR28929 (which we mistakenly marked as fixed before)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319736 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 04:09:49 +00:00
Marshall Clow
f7d0fecf34 Add issue 2587, which was missed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319734 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 03:51:16 +00:00
Marshall Clow
94ab5eb370 Commit tests for changes in revision 319710
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319711 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04 23:04:53 +00:00
Marshall Clow
8f6293b39e Implement more of P0600: '[[nodiscard]] in the library' for C++2a
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319710 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04 23:03:42 +00:00
Marshall Clow
cd64646026 Ooops. I checked in a test for a bug I haven't fixed yet. Temporrarily commented it out.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319693 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04 20:46:38 +00:00
Marshall Clow
46b4ad5400 Implement P0457R2: 'String Prefix and Suffix Checking' for c++2a
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319687 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04 20:11:38 +00:00
Marshall Clow
aeded2bf6e Fix PR#35948: generate_n does not accept floating point Size arguments.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319675 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04 18:59:14 +00:00
Ben Hamilton
3156e63e7e [libcxx] Set up .arcconfig to point to new Diffusion CXX repository
Summary:
We want to automatically copy the appropriate mailing list
for review requests to the libc++ repository.

For context, see the proposal and discussion here:

http://lists.llvm.org/pipermail/cfe-dev/2017-November/056032.html

Similar to D40179, I set up a new Diffusion repository with callsign
"CXX" for libc++:

https://reviews.llvm.org/source/libcxx/

This explicitly updates libcxx's .arcconfig to point to the new
CXX repository in Diffusion, which will let us use Herald rule H268.

Reviewers: halyavin, EricWF, mclow.lists, compnerd, mstorsjo

Reviewed By: compnerd

Subscribers: cfe-commits, bkramer, dlj, sammccall, klimek, smeenai, mstorsjo, krytarowski

Differential Revision: https://reviews.llvm.org/D40500

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319666 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04 17:55:28 +00:00
Hamza Sood
9627e9b9f4 Corrected a typo in the building libc++ docs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319631 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-03 10:18:35 +00:00
Petr Hosek
4861f6dfdd [libcxx] Support getentropy as a source of randomness for std::random_device
Use this source use on Fuchsia where this is the oficially way
to obtain randomness. This could be also used on other platforms
that already support getentropy such as *BSD or Linux.

Differential Revision: https://reviews.llvm.org/D40319

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319523 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 06:34:33 +00:00
Petr Hosek
aec189a8d1 Include AddLLVM needed for tests in the right context
AddLLVM is needed for several functions that are used in tests and
as such needs to be included from the right context which previously
wasn't the case.

Differential Revision: https://reviews.llvm.org/D40280

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319515 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 03:16:50 +00:00
Marshall Clow
06f2e0050f Fix problems with r'890 when building on machines where sizeof(size_t) != sizeof(unsigned long long) and C++03
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319106 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 22:27:22 +00:00
Marshall Clow
3a968efeeb Revert commit removing allocator support from packaged_task. Will investigate further
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 20:47:54 +00:00
Marshall Clow
14ff89947c Implement LWG#2921 and LWG#2976 - removing allocator support from packaged_task.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319080 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:43:28 +00:00
Marshall Clow
21edec7dee Fix PR#35438 - bitset constructor does not zero unused bits
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:03:30 +00:00
Marshall Clow
0f25cd9e35 Fix failure on C++03 bots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319042 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 16:17:19 +00:00
Marshall Clow
b25029437e Implement LWG#2948: unique_ptr does not define operator<< for stream output
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319038 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 15:51:36 +00:00
Marshall Clow
c72032be60 More of P0600; marking allocation routines as [[nodiscard]]
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318992 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-26 02:55:38 +00:00
Marshall Clow
e29f3f1fa5 Fix copy/paste bug in test where we were putting a '3' into a vector<bool>. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318990 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-26 00:39:59 +00:00