aboutsummaryrefslogtreecommitdiff
path: root/libcxx/docs
AgeCommit message (Collapse)AuthorFilesLines
2024-01-22[libc++][NFC] Remove trailing whitespace from release notesLouis Dionne1-1/+1
2024-01-22[libc++][numeric] P0543R3: Saturation arithmetic (#77967)Hristo Hristov3-2/+3
Implements: https://wg21.link/P0543R3 - https://eel.is/c++draft/numeric.sat Additional references: - Division: https://eel.is/c++draft/expr.mul#4 - Arithmetic conversions: https://eel.is/c++draft/expr.arith.conv#1 - Clang builtins: https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions Depends on: https://github.com/llvm/llvm-project/pull/78086 --------- Co-authored-by: Zingam <zingam@outlook.com> Co-authored-by: Mark de Wever <zar-rpg@xs4all.nl>
2024-01-21[libc++][doc] Update the release notes for LLVM 18 (#78324)Mark de Wever4-20/+74
This is a preparation for the upcoming LLVM 18 release.
2024-01-21[libc++] Install modules. (#75741)Mark de Wever2-1/+7
Installs the source files of the experimental libc++ modules. These source files (.cppm) are used by the Clang to build the std and std.compat modules. The design of this patch is based on a discussing in SG-15 on 12.12.2023. (SG-15 is the ISO C++ Tooling study group): - The modules are installed at a location, that is not known to build systems and compilers. - Next to the library there will be a module manifest json file. This json file contains the information to build the module from the libraries sources. This information includes the location where the sources are installed. @ruoso supplied the specification of this json file. - If possible, the compiler has an option to give the location of the module manifest file (https://github.com/llvm/llvm-project/pull/76451). Currently there is no build system support, but it expected to be added in the future. Fixes: https://github.com/llvm/llvm-project/issues/73089
2024-01-21[libc++] Reland CI module improvements.Mark de Wever3-2/+13
Revert "Revert #76246 and #76083" This reverts commit 5c150e7eeba9db13cc65b329b3c3537b613ae61d. Adds a small fix that should properly disable the tests on Windows. Unfortunately the original poster has not provided feedback and the original patch did not fail in the LLVM CI infrastructure. Modules are known to fail on Windows due to non compliance of the C library. Currently not having this patch prevents testing on other platforms.
2024-01-21[libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (#76449)Hristo Hristov3-2/+3
Implements parts of: `P2637R3` https://wg21.link/P2637R3 (https://eel.is/c++draft/variant.visit) Implements: `basic_format_arg.visit()` `basic_format_arg.visit<R>()` Deprecates: `std::visit_format_arg()` The tests are as close as possible to the non-member function tests. To land after: https://github.com/llvm/llvm-project/pull/76447, https://github.com/llvm/llvm-project/pull/76268 --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-21[libc++][spaceship][NFC] Status page update (#78894)Hristo Hristov1-2/+2
Co-authored-by: Zingam <zingam@outlook.com>
2024-01-21[libc++][variant] P2637R3: Member `visit` (`std::variant`) (#76447)Hristo Hristov1-1/+1
Implements parts of: `P2637R3` https://wg21.link/P2637R3 (https://eel.is/c++draft/variant.visit) Implements: `variant.visit()` `variant.visit<R>()` The tests are as close as possible to the non-member function. To land after: https://github.com/llvm/llvm-project/pull/76268 --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-21[libc++] <experimental/simd> Add load constructor for class simd/simd_mask ↵ZhangYin1-0/+2
(#76610)
2024-01-20Module documentation improvement: prebuilt module location can be directly ↵LEE KYOUNGHEON1-2/+2
fetched via CMake variable. (#78405) CMake officially supports binary directory variable of installed dependency using `FetchContent`. According to the current documentation, it fetches `std` module and use its binary directory as hardcoded string, `${CMAKE_BINARY_DIR}/_deps/std-build`, however it can be replaced with `${std_BINARY_DIR}`. Reference: https://cmake.org/cmake/help/latest/module/FetchContent.html
2024-01-20[libc++][spaceship][NFC] Status page update: *libc++* Spaceship Operator ↵Hristo Hristov1-4/+5
Status (`operator<=>`)¶ (#78832) Co-authored-by: Zingam <zingam@outlook.com>
2024-01-20[libc++][span] P2447R4: `std::span` over an initializer list (#78157)Hristo Hristov3-2/+3
Implements: https://wg21.link/P2447R6 - https://eel.is/c++draft/span.syn - https://eel.is/c++draft/span.overview - https://eel.is/c++draft/span.cons - https://eel.is/c++draft/diff --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-20[libc++][any] LWG3305: `any_cast<void>` (#78215)Hristo Hristov1-1/+1
Implements: https://wg21.link/LWG3305 - https://eel.is/c++draft/any.nonmembers --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-20[libc++][memory] P2868R1: Removing deprecated typedef ↵Hristo Hristov4-2/+9
`std::allocator::is_always_equal` (#78562) Implements: - https://wg21.link/P2868R1 - https://wg21.link/LWG3170 --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-19[libc++][hardening] In production hardening modes, trap rather than abort ↵Konstantin Varlamov2-29/+33
(#78561) In the hardening modes that can be used in production (`fast` and `extensive`), make a failed assertion invoke a trap instruction rather than calling verbose abort. In the debug mode, still keep calling verbose abort to provide a better user experience and to allow us to keep our existing testing infrastructure for verifying assertion messages. Since the debug mode by definition enables all assertions, we can be sure that we still check all the assertion messages in the library when running the test suite in the debug mode. The main motivation to use trapping in production is to achieve better code generation and reduce the binary size penalty. This way, the assertion handler can compile to a single instruction, whereas the existing mechanism with verbose abort results in generating a function call that in general cannot be optimized away (made worse by the fact that it's a variadic function, imposing an additional penalty). See the [RFC](https://discourse.llvm.org/t/rfc-hardening-in-libc/73925) for more details. Note that this mechanism can now be completely [overridden at CMake configuration time](https://github.com/llvm/llvm-project/pull/77883). This patch also significantly refactors `check_assertion.h` and expands its test coverage. The main changes: - when overriding `verbose_abort`, don't do matching inside the function -- just print the error message to `stderr`. This removes the need to set a global matcher and allows to do matching in the parent process after the child finishes; - remove unused logic for matching source locations and for using wildcards; - make matchers simple functors; - introduce `DeathTestResult` that keeps data about the test run, primarily to make it easier to test. In addition to the refactoring, `check_assertion.h` can now recognize when a process exits due to a trap.
2024-01-19[libc++] Implement LWG3940: std::expected<void, E>::value() also needs E to ↵Twice1-1/+1
be copy constructible (#71819) This patch includes the fix for [LWG3940](https://cplusplus.github.io/LWG/issue3940) (`std::expected<void, E>::value()` also needs `E` to be copy constructible)
2024-01-18Revert #76246 and #76083Daniel Thornburgh3-13/+2
These cause test build failures on Windows. This reverts the following commits: 57ca74843586c9a93c425036c5538aae0a2cfa60 d06ae33ec32122bb526fb35025c1f0cf979f1090
2024-01-17[libc++][hardening] Rework how the assertion handler can be overridden. (#77883)Konstantin Varlamov3-64/+50
Previously there were two ways to override the verbose abort function which gets called when a hardening assertion is triggered: - compile-time: define the `_LIBCPP_VERBOSE_ABORT` macro; - link-time: provide a definition of `__libcpp_verbose_abort` function. This patch adds a new configure-time approach: the vendor can provide a path to a custom header file which will get copied into the build by CMake and included by the library. The header must provide a definition of the `_LIBCPP_ASSERTION_HANDLER` macro which is what will get called should a hardening assertion fail. As of this patch, overriding `_LIBCPP_VERBOSE_ABORT` will still work, but the previous mechanisms will be effectively removed in a follow-up patch, making the configure-time mechanism the sole way of overriding the default handler. Note that `_LIBCPP_ASSERTION_HANDLER` only gets invoked when a hardening assertion fails. It does not affect other cases where `_LIBCPP_VERBOSE_ABORT` is currently used (e.g. when an exception is thrown in the `-fno-exceptions` mode). The library provides a default version of the custom header file that will get used if it's not overridden by the vendor. That allows us to always test the override mechanism and reduces the difference in configuration between the pristine version of the library and a platform-specific version.
2024-01-17[libc++][modules] Adds module testing. (#76246)Mark de Wever1-1/+8
This adds a new module test infrastructure. This requires tagging tests using modules. The test runner uses this information to determine the compiler flags needed to build and use the module. Currently modules are build per test, which allows testing them for tests with ADDITIONAL_COMPILE_FLAGS. At the moment only 4 tests use modules. Therefore the performance penalty is not measurable. If in the future more tests use modules it would be good to measure the overhead and determine whether it's acceptable.
2024-01-17[libc++][modules] Removes module testing. (#76083)Mark de Wever2-1/+5
This removes the entire modules testing infrastructure. The current infrastructure uses CMake to generate the std and std.compat module. This requires quite a bit of plumbing and uses CMake. Since CMake introduced module support in CMake 3.26, modules have a higher CMake requirement than the rest of the LLVM project. (The LLVM project requires 3.20.) The main motivation for this approach was how libc++ generated its modules. Every header had its own module partition. This was changed to improve performance and now only two modules remain. The code to build these can be manually crafted. A followup patch will reenable testing modules, using a different approach.
2024-01-16[libc++][NFC] Add deprecated mention for ↵Louis Dionne1-0/+1
_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS in the docs This was missed in the patch where I marked the macro as deprecated.
2024-01-16[libc++] Deprecate removed features macros. (#77879)Mark de Wever2-0/+14
We discussed the removal of these enable-all macros in the libc++ monthly meeting and we agreed that we should deprecate these macros in LLVM 18, and then remove them in LLVM 19 since they can silently enable deprecated features that are implemented after the first release of the macro. This patch does the first part of this -- it deprecates the macro. Note that the file test/libcxx/depr/enable_removed_cpp20_features.compile.pass.cpp does not exist so this file is not adapted. Since the feature is deprecated and slated for removal soon the missing test is not implemented. Partly addresses: https://github.com/llvm/llvm-project/issues/75976 --------- Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2024-01-16[libc++][doc] Removes LLVM-17 release notes. (#78062)Mark de Wever2-235/+0
The old notes are kept to make it easier to backport changes to the release branch. There are no LLVM-17 releases expected and this documentation should not be available in the LLVM-18 release. Note after branching LLVM-18 both LLVM-18 and LLVM-19 release notes should be available.
2024-01-13[libc++][doc] Bump required GCC version.Mark de Wever1-1/+1
GCC 13 is the latest GCC release and tested in the libc++ CI for several month. According to our policy we only support the latest version, update the documentation to the latest version.
2024-01-13[libc++][NFC] Release notes: fixed formatting (#78058)Hristo Hristov1-3/+3
Co-authored-by: Zingam <zingam@outlook.com>
2024-01-12[libc++] Deprecate the _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS macro ↵Louis Dionne1-0/+9
(#77692) As described in #69994, using the escape hatch makes us non-conforming in C++20 due to incorrect constexpr-ness. It also leads to bad diagnostics as reported by #63900. We discussed the issue in the libc++ monthly meeting and we agreed that we should deprecate the macro in LLVM 18, and then remove it in LLVM 19 since it causes too many problems. This patch does the first part of this -- it deprecates the macro. Fixes #69994 Fixes #63900 Partially addresses #75975
2024-01-11[runtimes] Use LLVM libunwind from libc++abi by default (#77687)Louis Dionne2-1/+8
I recently came across LIBCXXABI_USE_LLVM_UNWINDER and was surprised to notice it was disabled by default. Since we build libunwind by default and ship it in the LLVM toolchain, it would seem to make sense that libc++ and libc++abi rely on libunwind for unwinding instead of using the system-provided unwinding library (if any). Most importantly, using the system unwinder implies that libc++abi is ABI compatible with that system unwinder, which is not necessarily the case. Hence, it makes a lot more sense to instead default to using the known-to-be-compatible LLVM unwinder, and let vendors manually select a different unwinder if desired. As a follow-up change, we should probably apply the same default to compiler-rt. Differential Revision: https://reviews.llvm.org/D150897 Fixes #77662 rdar://120801778
2024-01-10[libc++][docs] Document the libc++ Lit testing format naming scheme (#73136)Will Hawkins1-8/+88
As a new contributor, I found it hard to find the documentation for the meaning of the names of different tests and how those names translate to Lit. This patch moves the documentation to the RST documentation we publish on the website instead of leaving it in the source code only.
2024-01-09[libc++][CI] Moves CI badge to main README. (#77247)Mark de Wever1-4/+0
The current CI badge is currently in libc++ documentation. This does not seem the right place: - The typical location on GitHub is on the main README. - The documentation is shipped as part of the release: - This link does not work in off-line mode. Currently our documentation works in off-line mode. - The status in the release documentation does not reflect the status of the shipped library. So users looking at it may see a red status and get confused. This moves the badge to the README.
2024-01-09[libc++] Implements P2517R1. (#77239)Mark de Wever2-1/+2
As pointed out by @Zingam the paper was implemented in libc++ as an extension. This patch does the bookkeeping. The inital release version is based on historical release dates. Completes: - Add a conditional noexcept specification to std::apply
2024-01-08[libc++][doc] Marks LWG3257 as complete (#77237)Mark de Wever1-1/+1
The macros were already updated - __cpp_lib_string_view in 466df1718e41fe2fca6ce6bd98c01b18f42c05e4 - __cpp_lib_array_constexpr in 77b9abfc8e89ca627e4f9a1cc206bea131db6db1 Based on the dates of the commit and that P0858 "Constexpr iterator requirements" was completed in LLVM 12, set this issue as completed in the same version. Completes - LWG3257 Missing feature testing macro update from P0858
2024-01-07Reapply "[libc++][streams] P1759R6: Native handles and file streams" (#77190)Hristo Hristov3-2/+3
Fixes build on Windows in C++26 mode. Reverted in: https://github.com/llvm/llvm-project/commit/40c07b559aa6ab4bac074c943967d3207bc07ae0 Original PR: https://github.com/llvm/llvm-project/pull/76632 --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-07[libc++][doc] Minor release notes style fixes.Mark de Wever1-3/+2
2024-01-05Revert "[libc++][streams] P1759R6: Native handles and file streams (#76632)"Haowei Wu3-3/+2
This reverts commit 255f95a40377677dd762df5a1aa65bcbb4f75c79, which contains a breaking libcxx test on Windows when using C++26
2024-01-05[libc++][streams] P1759R6: Native handles and file streams (#76632)Hristo Hristov3-2/+3
Implements: `P1759R6` https://wg21.link/P1759R6 - https://eel.is/c++draft/filebuf - https://eel.is/c++draft/ifstream - https://eel.is/c++draft/ofstream - https://eel.is/c++draft/fstream --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-05[libc++][span] P2821R5: `span.at()` (#74994)Hristo Hristov3-1/+4
- Implements: [P2821R5: span.at()](https://wg21.link/P2821R5) (https://eel.is/c++draft/views.contiguous#views.span) - Cleaned up `span.operator[]` test --------- Co-authored-by: Zingam <zingam@outlook.com>
2024-01-02[libc++][ranges][abi-break] Fix `movable_box` overwriting memory of data ↵Hui1-0/+12
that lives in the tail padding (#71314) fixes #70506 The detailed problem description is in #70506 The original proposed fix was to remove `[[no_unique_address]]` except when `_Tp` is empty. Edit: After the discussion in the comments below, the new fix here is to remove the `[[no_unique_address]]` from `movable_box` in the cases where we need to add our own assignment operator, which has contains the problematic `construct_at`
2023-12-30[libc++] Deprecates and removes shared_ptr::unqiue. (#76576)Mark de Wever4-2/+10
The status table incorrectly marks P0521R0 as nothing to do. This is not correct the function should be deprecated. During our latest monthly meeting we argreed to remove the _LIBCPP_ENABLE_CXXyy_REMOVED_FEATURES macros, therefore the new macro is not added to that global list. Implements - P0521R0 Proposed Resolution for CA 14 (shared_ptr use_count/unique) Implements parts of - P0619R4 Reviewing Deprecated Facilities of C++17 for C++20 --------- Co-authored-by: Nikolas Klauser <nikolasklauser@berlin.de>
2023-12-19[libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (#75259)Christopher Di Bella1-0/+6
Notable things in this commit: * refactors `__indirect_binary_left_foldable`, making it slightly different (but equivalent) to _`indirect-binary-left-foldable`_, which improves readability (a [patch to the Working Paper][patch] was made) * omits `__cpo` namespace, since it is not required for implementing niebloids (a cleanup should happen in 2024) * puts tests ensuring invocable robustness and dangling correctness inside the correctness testing to ensure that the algorithms' results are still correct [patch]: https://github.com/cplusplus/draft/pull/6734
2023-12-19[libc++][print] Adds ostream overloads. (#73262)Mark de Wever6-6/+31
Finishes implementation of - P2093R14 Formatted output - P2539R4 Should the output of std::print to a terminal be synchronized with the underlying stream? Differential Revision: https://reviews.llvm.org/D156609
2023-12-16[libc++][spaceship][NFC] Status page - added papers (#75043)Hristo Hristov2-2/+4
Added C++20 papers to Spaceship status page Co-authored-by: Hristo Hristov <zingam@outlook.com>
2023-12-13Move status badge as suggested in post-commit revieweric1-4/+4
2023-12-13Add libc++ main builder status badge (#75283)Eric1-0/+5
Also add links to github actions workflow.
2023-12-12[libc++][doc] Updates module information. (#75003)Mark de Wever1-17/+22
Adds the std.compat module and add support for CMake 3.28.
2023-12-12[libc++][CI] Tests the no RTTI configuration. (#65518)Mark de Wever1-0/+1
There are a few drive-by fixes: - Since the combination RTTI disabled and exceptions enabled do not work, this combination is prohibited. - A small NFC in any fixing clang-tidy. The code in the Buildkite configuration is prepared for using the std module. There are more fixes needed for that configuration which will be done in a separate commit.
2023-12-12[libc++] P2770R0: Stashing stashing iterators for proper flattening (#66033)Jakub Mazurkiewicz3-2/+2
- Partially implements P2770R0 (http://wg21.link/p2770) - Fixes https://wg21.link/LWG3698, https://wg21.link/LWG3700, and https://wg21.link/LWG3791 - join_with_view hasn't been done yet since this type isn't implemented yet - Rename tuple test directory to match the standard (which changed in P2770R0) - Rename join_view test directory to match the standard
2023-12-09[libc++] Implements Runtime format strings. (#73353)Mark de Wever3-2/+3
This change requires quite a number of changes in the tests; this is not code I expect people to use in the wild. So I don't expect breakage for users. Implements: - P2905R2 Runtime format strings, as a Defect Report
2023-12-06[libcxx] reorganises the hardening documentation (#73159)Christopher Di Bella1-54/+65
The reorganisation assists with identifying information that's relevant to the reader by using sections, note/warning blocks, and highlighted lists. Some rewording was necessary to fit the new structure and some to improve flow. Changes to the intention of the documentation have not been made. --------- Co-authored-by: Will Hawkins <whh8b@obs.cr>
2023-12-05[libc++] Replace uses of _VSTD:: by std:: (#74331)Louis Dionne1-1/+0
As part of the upcoming clang-formatting of libc++, this patch performs the long desired removal of the _VSTD macro. See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all for the clang-format proposal.
2023-12-05[libc++] Mark P2017R1 as complete (#74484)Jakub Mazurkiewicz1-1/+1
[P2017R1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2017r1.html#wording) appears to have been implemented in LLVM 16.0: https://godbolt.org/z/GbcT4rjcd.