Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3 |
|
#
6c4267fb |
| 21-Oct-2024 |
Michael Jones <michaelrj@google.com> |
[libcxx][libc] Hand in Hand PoC with from_chars (#91651)
Implements std::from_chars for float and double.
The implementation uses LLVM-libc to do the real parsing. Since this is the first time libc
[libcxx][libc] Hand in Hand PoC with from_chars (#91651)
Implements std::from_chars for float and double.
The implementation uses LLVM-libc to do the real parsing. Since this is the first time libc++ uses LLVM-libc there is a bit of additional infrastructure code. The patch is based on the [RFC] Project Hand In Hand (LLVM-libc/libc++ code sharing)
https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701
show more ...
|
Revision tags: llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1 |
|
#
eb65912e |
| 19-Mar-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Move __errc to __system_error/errc.h
This file was added before we started granularizing the headers, but is essentially just a granularized header. This moves the header to the correct pla
[libc++] Move __errc to __system_error/errc.h
This file was added before we started granularizing the headers, but is essentially just a granularized header. This moves the header to the correct place.
Reviewed By: #libc, EricWF
Spies: libcxx-commits, arichardson, mikhail.ramalho
Differential Revision: https://reviews.llvm.org/D146395
show more ...
|
Revision tags: llvmorg-16.0.0 |
|
#
fb855eb9 |
| 14-Mar-2023 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Qualifies size_t.
This has been done using the following command
find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)size_t)|\1std::\2|' \{} \;
And manually removed some fals
[libc++] Qualifies size_t.
This has been done using the following command
find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)size_t)|\1std::\2|' \{} \;
And manually removed some false positives in std/depr/depr.c.headers.
The `std` module doesn't export `::size_t`, this is a preparation for that module.
Reviewed By: ldionne, #libc, EricWF, philnik
Differential Revision: https://reviews.llvm.org/D146088
show more ...
|
Revision tags: llvmorg-16.0.0-rc4 |
|
#
f7efcaca |
| 08-Mar-2023 |
Mark de Wever <koraq@xs4all.nl> |
[libc++][charconv] Granularizes the header.
Having the header granularized makes it possible to remove the dependency on this header in <format>. This <format> header gets included in more headers d
[libc++][charconv] Granularizes the header.
Having the header granularized makes it possible to remove the dependency on this header in <format>. This <format> header gets included in more headers due to more usage of std::formatter in the library. This should reduce the number of transitive includes.
Note formatting the new headers will be done in a followup patch.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D145590
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
#
a1e13a80 |
| 06-Aug-2022 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Implements constexpr <charconv>.
Implements: - P2291R3 Add Constexpr Modifiers to Functions to_chars and from_chars for Integral Types in <charconv> Header
Reviewed By: #libc, ldionne
D
[libc++] Implements constexpr <charconv>.
Implements: - P2291R3 Add Constexpr Modifiers to Functions to_chars and from_chars for Integral Types in <charconv> Header
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D131317
show more ...
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
3f786833 |
| 30-Jun-2022 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Implements 128-bit support in to_chars.
This is required by the Standard and makes it possible to add full 128-bit support to format.
The patch also fixes 128-bit from_chars "support". One
[libc++] Implements 128-bit support in to_chars.
This is required by the Standard and makes it possible to add full 128-bit support to format.
The patch also fixes 128-bit from_chars "support". One unit test required a too large value, this failed on 128-bit; the fix was to add more characters to the input.
Note only base 10 has been optimized. Other bases can be optimized.
Note the 128-bit lookup table could be made smaller. This will be done later. I really want to get 128-bit working in to_chars and format in the upcomming LLVM 15 release, these optimizations aren't critical.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D128929
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
#
14324fa4 |
| 14-Mar-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add warning pragma macros in the test suite
Reviewed By: ldionne, #libc, EricWF
Spies: EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D121552
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
4e00a192 |
| 29-Dec-2021 |
Casey Carter <Casey@Carter.net> |
[libcxx][test] compiler options are non-portable
... it's easier to suppress warnings internally, where we can detect the compiler.
* Rename `TEST_COMPILER_C1XX` to `TEST_COMPILER_MSVC` * Rename al
[libcxx][test] compiler options are non-portable
... it's easier to suppress warnings internally, where we can detect the compiler.
* Rename `TEST_COMPILER_C1XX` to `TEST_COMPILER_MSVC` * Rename all `TEST_WORKAROUND_C1XX_<meow>` to `TEST_WORKAROUND_MSVC_<meow>`
Differential Revision: https://reviews.llvm.org/D117422
show more ...
|
#
cb71d77c |
| 29-Dec-2021 |
Casey Carter <Casey@Carter.net> |
[libcxx][test] Add missing includes and suppress warnings
... from testing with MSVC's STL. Mostly truncation warnings and variables that are only used in `LIBCPP_ASSERT`.
Differential Revision: ht
[libcxx][test] Add missing includes and suppress warnings
... from testing with MSVC's STL. Mostly truncation warnings and variables that are only used in `LIBCPP_ASSERT`.
Differential Revision: https://reviews.llvm.org/D116878
show more ...
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3 |
|
#
9393060f |
| 27-Feb-2021 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Fixes std::to_chars for bases != 10.
While working on D70631, Microsoft's unit tests discovered an issue. Our `std::to_chars` implementation for bases != 10 uses the range `[first,last)` as
[libc++] Fixes std::to_chars for bases != 10.
While working on D70631, Microsoft's unit tests discovered an issue. Our `std::to_chars` implementation for bases != 10 uses the range `[first,last)` as temporary buffer. This violates the contract for to_chars: [charconv.to.chars]/1 http://eel.is/c++draft/charconv#to.chars-1 `to_chars_result to_chars(char* first, char* last, see below value, int base = 10);` "If the member ec of the return value is such that the value is equal to the value of a value-initialized errc, the conversion was successful and the member ptr is the one-past-the-end pointer of the characters written."
Our implementation modifies the range `[member ptr, last)`, which causes Microsoft's test to fail. Their test verifies the buffer `[member ptr, last)` is unchanged. (The test is only done when the conversion is successful.)
While looking at the code I noticed the performance for bases != 10 also is suboptimal. This is tracked in D97705.
This patch fixes the issue and adds a benchmark. This benchmark will be used as baseline for D97705.
Reviewed By: #libc, Quuxplusone, zoecarver
Differential Revision: https://reviews.llvm.org/D100722
show more ...
|
#
4cd6ca10 |
| 20-Apr-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] NFC: Normalize `#endif //` comment indentation
|
Revision tags: llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init |
|
#
bf7dc572 |
| 13-Dec-2019 |
Stephan T. Lavavej <stl@microsoft.com> |
[libcxx] [test] Fix valarray UB and MSVC warnings.
[libcxx] [test] Calling min and max on an empty valarray is UB.
libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp
[libcxx] [test] Fix valarray UB and MSVC warnings.
[libcxx] [test] Calling min and max on an empty valarray is UB.
libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp libcxx/test/std/numerics/numarray/template.valarray/valarray.members/max.pass.cpp
The calls `v1.min();` and `v1.max();` were emitting nodiscard warnings with MSVC's STL. Upon closer inspection, these calls were triggering undefined behavior. N4842 [valarray.members] says:
"T min() const; 8 Preconditions: size() > 0 is true. T max() const; 10 Preconditions: size() > 0 is true."
As these tests already provide coverage for non-empty valarrays (immediately above), I've simply deleted the code for empty valarrays.
[libcxx] [test] Add macros to msvc_stdlib_force_include.h (NFC).
libcxx/test/support/msvc_stdlib_force_include.h
These macros are being used by: libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp Defining them to nothing allows that test to pass.
[libcxx] [test] Silence MSVC warning C5063 for is_constant_evaluated (NFC).
libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.pass.cpp
This test is intentionally writing code that MSVC intentionally warns about, so the warning should be silenced.
Additionally, comment an endif for clarity.
[libcxx] [test] Silence MSVC warning C4127 (NFC).
libcxx/test/support/charconv_test_helpers.h
MSVC avoids emitting this warning when it sees a single constexpr value being tested, but this condition is a mix of compile-time and run-time. Using push-disable-pop is the least intrusive way to silence this.
[libcxx] [test] Silence MSVC truncation warning (NFC).
libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
This test is intentionally truncating float to int, which MSVC intentionally warns about, so push-disable-pop is necessary.
[libcxx] [test] Avoid truncation warnings in erase_if tests (NFC).
libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp
These tests use maps with `short` keys and values, emitting MSVC truncation warnings from `int`. Adding `static_cast` to `key_type` and `mapped_type` avoids these warnings.
As these tests require C++20 mode (or newer), for brevity I've changed the multimap tests to use emplace to initialize the test data. This has no effect on the erase_if testing.
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
#
769c2459 |
| 20-Mar-2019 |
Marshall Clow <mclow.lists@gmail.com> |
Make to_chars/from_chars work back to C++11. This means that we can use them to implement to_string as well. Reviewed as https://reviews.llvm.org/D59598.
llvm-svn: 356585
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
57b08b09 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update more file headers across all of the LLVM projects in the monorepo to reflect the new license. These used slightly different spellings that defeated my regular expressions.
We understand that
Update more file headers across all of the LLVM projects in the monorepo to reflect the new license. These used slightly different spellings that defeated my regular expressions.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351648
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
63ebd3bd |
| 01-Aug-2018 |
Zhihao Yuan <zy@miator.net> |
[libc++] Fix build failures after merging <charconv>
Summary: - fix a stupid unit test typo - add <charconv> symbols to Linux abilist
Reviewers: EricWF
Subscribers: christof, ldionne, cfe-commits
[libc++] Fix build failures after merging <charconv>
Summary: - fix a stupid unit test typo - add <charconv> symbols to Linux abilist
Reviewers: EricWF
Subscribers: christof, ldionne, cfe-commits
Differential Revision: https://reviews.llvm.org/D50130
llvm-svn: 338486
show more ...
|
#
d2748964 |
| 01-Aug-2018 |
Zhihao Yuan <zy@miator.net> |
[libc++][C++17] Elementary string conversions for integral types
Summary: Major QoI considerations:
- The facility is backported to C++14, same as libstdc++. - Efforts have been made to minimize th
[libc++][C++17] Elementary string conversions for integral types
Summary: Major QoI considerations:
- The facility is backported to C++14, same as libstdc++. - Efforts have been made to minimize the header dependencies. - The design is friendly to the uses of MSVC intrinsics (`__emulu`, `_umul128`, `_BitScanForward`, `_BitScanForward64`) but not implemented; future contributions are welcome.
Thanks to Milo Yip for contributing the implementation of `__u64toa` and `__u32toa`.
References: https://wg21.link/p0067r5 https://wg21.link/p0682r1
Reviewers: mclow.lists, EricWF
Reviewed By: mclow.lists
Subscribers: ldionne, Quuxplusone, christof, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D41458
llvm-svn: 338479
show more ...
|