| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 320604
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 320509
|
|
|
|
|
|
|
|
| |
Fixes #35578.
Differential Revision: D41048
llvm-svn: 320500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 320363
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 320201
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 319959
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 319816
|
|
|
|
|
|
|
|
|
|
| |
The parameter was previously renamed but MSVC path was not updated.
Patch by Andrey Khalyavin.
Differential Revision: https://reviews.llvm.org/D40774
llvm-svn: 319802
|
|
|
|
| |
llvm-svn: 319779
|
|
|
|
| |
llvm-svn: 319736
|
|
|
|
| |
llvm-svn: 319710
|
|
|
|
| |
llvm-svn: 319687
|
|
|
|
| |
llvm-svn: 319675
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 319523
|
|
|
|
|
|
| |
sizeof(unsigned long long) and C++03
llvm-svn: 319106
|
|
|
|
|
|
| |
investigate further
llvm-svn: 319091
|
|
|
|
| |
llvm-svn: 319080
|
|
|
|
| |
llvm-svn: 319074
|
|
|
|
| |
llvm-svn: 319042
|
|
|
|
| |
llvm-svn: 319038
|
|
|
|
| |
llvm-svn: 318992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the problem PR31516 with setting locale on Windows by wrapping
_locale_t with a pointer-like class.
Reduces 74 test failures in std/localization test suite to 47 test
failures (on llvm clang, Visual Studio 2015). Number of test failures
doesn't depend on the platform (x86 or x64).
Patch by Andrey Khalyavin.
Differential Revision: https://reviews.llvm.org/D40181
llvm-svn: 318902
|
|
|
|
| |
llvm-svn: 318889
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Now implements P0653R2 - Utility to convert to raw pointer.
Reviewers: mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D35470
llvm-svn: 318865
|
|
|
|
| |
llvm-svn: 318864
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
error.
It covers the cases when the sentry object returns false and when an exception
was thrown. Corresponding standard paragraph is C++14 [istream.unformatted]p21:
In any case, if n is greater than zero, it then stores a null character
(using charT()) into the next successive location of the array.
Patch by Reimar Döffinger.
llvm-svn: 318862
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One can't replace vsscanf(_l) with a sscanf(_l) that doesn't
take a va_list.
This has been untouched since it was added in SVN r140728, so
apparently it hasn't been used since. One reason for this mistake
originally might have been that there was no _vsscanf_l until MSVC
2015.
Since it's unused, just remove this define.
Differential Revision: https://reviews.llvm.org/D40323
llvm-svn: 318810
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The non-const data() member of std::string is only exposed
in C++17 and beyond. However std::string is externally instantiated
and so the member function needs to be exposed to be externally instantiated.
On Linux and OS X this shouldn't cause a problem, because
_LIBCPP_INLINE_VISIBILITY ensures the symbol is always inlined.
However on Windows, the symbol gets marked dllimport, but
there is no definition to import, causing link errors.
llvm-svn: 318690
|
|
|
|
| |
llvm-svn: 318622
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently `std::variant` always uses an unsigned int to store the variant index. However this isn't nessesary and causes `std::variant` to be larger than it needs to be in most cases.
This patch changes the index type to be `unsigned char` when possible, and `unsigned short` or `unsigned int` otherwise, depending on the size (Although it's questionable if it's even possible to create a variant with 65535 elements.
Unfortunately this change is an ABI break, and as such is only enabled in ABI v2.
Reviewers: mpark
Reviewed By: mpark
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D40210
llvm-svn: 318621
|
|
|
|
| |
llvm-svn: 318432
|
|
|
|
|
|
| |
filesystem::path
llvm-svn: 318378
|
|
|
|
|
|
| |
match_results. <regex>
llvm-svn: 318375
|
|
|
|
|
|
| |
string, string_view, and the free function std::empty(). Removed tabs from <string_view>, which is why the diff is so big.
llvm-svn: 318328
|
|
|
|
|
|
| |
'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only
llvm-svn: 318269
|
|
|
|
|
|
| |
_LIBCPP_CONSTEXPR_AFTER_CXX17, along with a way to turn off the NODISCARD one: _LIBCPP_DISABLE_NODISCARD_AFTER_CXX17. No one is using these yet, but we will be ... soon
llvm-svn: 318208
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In the CHERI clang compiler __output and __input are keywords and therefore
we can't compile libc++ with our compiler.
Reviewers: mclow.lists, EricWF, theraven
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D39537
llvm-svn: 318144
|
|
|
|
| |
llvm-svn: 318125
|
|
|
|
| |
llvm-svn: 318119
|
|
|
|
| |
llvm-svn: 318011
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commit r300140 changed the implementation of compressed_pair, but didn't add
_LIBCPP_INLINE_VISIBILITY to the constructors and get members of the
compressed_pair_elem class. This patch adds the visibility annotation.
I didn't find a way to test this change with libc++ regression tests.
rdar://35352579
Differential Revision: https://reviews.llvm.org/D39751
llvm-svn: 317816
|
|
|
|
|
|
|
|
| |
Broke the Darwin build bots.
This reverts commit f56f1bba1ade4a408d403ff050d50e837bae47df.
llvm-svn: 317142
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
quick_exit() and at_quick_exit() were introduced in android NDK 21:
https://android.googlesource.com/platform/prebuilts/ndk/+/dev/platform/sysroot/usr/include/stdlib.h#55
This CL conditions `_LIBCPP_HAS_QUICK_EXIT` on `__ANDROID_API__ >= 21`. The only place this macro is used is in some using declarations: `using ::quick_exit`, `using ::at_quick_exit`.
Also, add a missing include to sys/cdefs.h which is what defines `__BIONIC__`.
Reviewers: thakis, danalbert, EricWF
Reviewed By: danalbert
Subscribers: srhines, krytarowski
Differential Revision: https://reviews.llvm.org/D39479
llvm-svn: 317124
|
|
|
|
| |
llvm-svn: 317063
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Yaroshevskiy for both the bug report and the fix.
llvm-svn: 316914
|
|
|
|
|
|
| |
Update the tests to check this (and other noexcept bits
llvm-svn: 316456
|
|
|
|
|
|
| |
for the bug report.
llvm-svn: 316439
|
|
|
|
| |
llvm-svn: 316343
|
|
|
|
|
|
| |
Found by OSS-Fuzz
llvm-svn: 316191
|