aboutsummaryrefslogtreecommitdiff
path: root/libcxx
AgeCommit message (Collapse)AuthorFilesLines
6 hours[libcxx] Enable installing new runner binary on existing containerAiden Grossman2-1/+13
This patch does some refactoring to enable installing a new GHA runner binary into an existing libcxx image. We achieve this by pushing the base image to the registry and enabling control over the base image used for building the actions image. This will always build and push both images even if an existing image is being used for the actions image, but this should not impact anything as the SHAs are pinned everywhere and space/build time is not a large concern. Reviewers: ldionne, EricWF, #reviewers-libcxx Reviewed By: ldionne Pull Request: https://github.com/llvm/llvm-project/pull/148073
7 hours[libcxx] Install runner last when building CI containersAiden Grossman2-3/+17
This patch changes when we install the GHA runner in the CI containers. Instead of having it in the base image, we install it last. This will enable a follow up patch that will do some setup enabling building the full container image with an existing base image, thus enabling updating the GHA runner without modifying the important bits. Reviewers: EricWF, ldionne Reviewed By: ldionne Pull Request: https://github.com/llvm/llvm-project/pull/148072
3 days[libc++] Add missing CPO tests for range adaptors (#149557)Louis Dionne1-6/+35
Co-authored-by: A. Jiang <de34@live.cn>
3 days[libc++][NFC] Make __is_segmented_iterator a variable template (#149976)Nikolas Klauser12-22/+23
4 days[libc++] Move a bunch of tests from libcxx/test/libcxx to libcxx/test/std ↵Nikolas Klauser8-154/+81
(#150199) These tests test standard behaviour, so they shouldn't be in the libc++-specific tests.
4 days[libc++][hardening] Add an experimental function to log hardening errors ↵Konstantin Varlamov9-0/+110
(#149452) Unlike `verbose_abort`, this function merely logs the error but does not terminate execution. It is intended to make it possible to implement the `observe` semantic for Hardening.
4 days[libc++][NFC] Remove __all_default_constructible (#150406)Nikolas Klauser1-6/+0
`__all_default_constructible` is never used, so we can remove it.
7 days[libc++] Enable some tests on `android` (#149899)Hristo Hristov4-10/+2
Android compiler was updated to r563880: https://github.com/llvm/llvm-project/pull/148998
7 days[libc++] Remove mentions of Clang 18 in the test suite (#148862)Louis Dionne16-57/+21
Clang 19 has been the oldest supported version of Clang since the LLVM 20 release, but we had not cleaned up the test suite yet.
8 days[libc++] Avoid duplicate LWGXYZ prefixes in status tables (#148874)Louis Dionne1-4/+4
When synchronizing the status tables with Github issues, we use the title of the Github issue as the name of the paper in the status table. However, the Github issue titles are prefixed with PXYZ or LWGXYZ (which is useful to quickly find papers), and that is redundant in the context of status tables. This patch ensures that we don't add that redundant PXYZ or LWGXYZ prefix. As a drive-by, also specify the encoding for opening files explicitly, which fixes issues on Windows.
8 days[libc++][regex] Throw exception in the case of wrong range (#148231)Lazarev Alexei2-2/+5
Starting and ending parameters are considered to decide that a range is a correct one Fix #51028 Co-authored-by: alexey.lazarev <alexey.lazarev@tasking.com> Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
9 days[libc++] Refactor internal index_sequence API to match the public one (#149475)Nikolas Klauser18-208/+139
The internal API is a lot more complicated than it actually needs to be. This refactors the internal API to match the features and names of the public one.
9 days[libc++][ranges] implement `std::ranges::zip_transform_view` (#79605)Hui55-77/+3525
Fixes #104977 Fixes #105035 --------- Co-authored-by: Louis Dionne <ldionne.2@gmail.com> Co-authored-by: A. Jiang <de34@live.cn>
9 days[libc++] constexpr flat_multimap (#148417)Hui65-1064/+2416
Fixes #128674
10 days[libc++] Add and empty skeleton for LLVM 22 release notes (#149535)Louis Dionne2-1/+60
10 days[libc++] Diagnose passing null pointers to a bunch of APIs (#148585)Nikolas Klauser11-45/+219
10 days[libc++] Move a bunch of extensions tests to test/extensions (#149275)Nikolas Klauser15-0/+0
10 daysReland [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named ↵YexuanXiao1-4/+4
sugar types (#149613) The checks for the 'z' and 't' format specifiers added in the original PR #143653 had some issues and were overly strict, causing some build failures and were consequently reverted at https://github.com/llvm/llvm-project/commit/4c85bf2fe8042c855c9dd5be4b02191e9d071ffd. In the latest commit https://github.com/llvm/llvm-project/pull/149613/commits/27c58629ec76a703fde9c0b99b170573170b4a7a, I relaxed the checks for the 'z' and 't' format specifiers, so warnings are now only issued when they are used with mismatched types. The original intent of these checks was to diagnose code that assumes the underlying type of `size_t` is `unsigned` or `unsigned long`, for example: ```c printf("%zu", 1ul); // Not portable, but not an error when size_t is unsigned long ``` However, it produced a significant number of false positives. This was partly because Clang does not treat the `typedef` `size_t` and `__size_t` as having a common "sugar" type, and partly because a large amount of existing code either assumes `unsigned` (or `unsigned long`) is `size_t`, or they define the equivalent of size_t in their own way (such as sanitizer_internal_defs.h).https://github.com/llvm/llvm-project/blob/2e67dcfdcd023df2f06e0823eeea23990ce41534/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h#L203
10 days[libc++][NFC] Fix typos in the libc++ 21 release notes (#149536)Louis Dionne1-2/+2
10 daysRemove last few bits for Native Client support (#148983)Brad Smith4-38/+2
10 days[libc++] Remove unused _LIBCPP_HAS_NO_STD_MODULES macro from __config_site ↵Louis Dionne1-1/+0
(#148902) Since 1d6b6132f, that macro isn't used anywhere anymore.
10 days[libc++][tests] Update XFAIL annotations for some tests on Windows (#149124)Paul Kirth3-9/+12
These tests still fail on Windows with clang-22, as reported in #70225. This started failing due to the version bump to Clang 22.
11 daysRevert "[Clang] Make the SizeType, SignedSizeType and PtrdiffType be named ↵Kazu Hirata1-4/+4
sugar types instead of built-in types (#143653)" This reverts commit c27e283cfbca2bd22f34592430e98ee76ed60ad8. A builbot failure has been reported: https://lab.llvm.org/buildbot/#/builders/186/builds/10819/steps/10/logs/stdio I'm also getting a large number of warnings related to %zu and %zx.
11 days[Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar ↵YexuanXiao1-4/+4
types instead of built-in types (#143653) Including the results of `sizeof`, `sizeof...`, `__datasizeof`, `__alignof`, `_Alignof`, `alignof`, `_Countof`, `size_t` literals, and signed `size_t` literals, the results of pointer-pointer subtraction and checks for standard library functions (and their calls). The goal is to enable clang and downstream tools such as clangd and clang-tidy to provide more portable hints and diagnostics. The previous discussion can be found at #136542. This PR implements this feature by introducing a new subtype of `Type` called `PredefinedSugarType`, which was considered appropriate in discussions. I tried to keep `PredefinedSugarType` simple enough yet not limited to `size_t` and `ptrdiff_t` so that it can be used for other purposes. `PredefinedSugarType` wraps a canonical `Type` and provides a name, conceptually similar to a compiler internal `TypedefType` but without depending on a `TypedefDecl` or a source file. Additionally, checks for the `z` and `t` format specifiers in format strings for `scanf` and `printf` were added. It will precisely match expressions using `typedef`s or built-in expressions. The affected tests indicates that it works very well. Several code require that `SizeType` is canonical, so I kept `SizeType` to its canonical form. The failed tests in CI are allowed to fail. See the [comment](https://github.com/llvm/llvm-project/pull/135386#issuecomment-3049426611) in another PR #135386.
11 days[libc++][Android] Reenable 2 tests for Android (#149415)Ryan Prichard2-6/+0
Now that the Android clang has been upgraded to clang-r563880 (llvm.org/pr148998), these two tests pass again.
11 days[libcxx][fstream][NFC] Make __failed helper lambda a member function (#149390)Michael Buch1-14/+14
This patch makes the `__failed` lambda a member function on `fstream`. This fixes two LLDB expression evaluation test failures that got introduced with https://github.com/llvm/llvm-project/pull/147389: ``` 16:22:51 ******************** 16:22:51 Unresolved Tests (2): 16:22:51 lldb-api :: commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py 16:22:51 lldb-api :: commands/expression/import-std-module/list/TestListFromStdModule.py ``` The expression evaluator is asserting in the Clang parser: ``` Assertion failed: (capture_size() == Class->capture_size() && "Wrong number of captures"), function LambdaExpr, file ExprCXX.cpp, line 1277. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. ``` Ideally we'd figure out why LLDB is falling over on this lambda. But to unblock CI for now, make this a member function. In the long run we should figure out the LLDB bug here so libc++ doesn't need to care about whether it uses lambdas like this or not.
11 days[libc++] Fix hash_multi{map,set}::insert (#149290)Nikolas Klauser4-4/+74
12 days[libc++] Move more tests into better places (#148419)Nikolas Klauser6-0/+3
12 days[libc++][NFC] Use variable templates in <string> (#149038)Nikolas Klauser1-34/+34
Variable templates are a bit lighter on the compiler than class templates.
12 days[libc++] Remove minimal_cxx11_configuration.pass.cpp (#149119)Nikolas Klauser1-130/+0
This test doesn't seem to be very useful. If it is the only test that fails we would just remove the failing parts of the test, and otherwise it doesn't provide any value either, since there will be another test that fails.
12 days[libc++] Add missing include <limits> to bitset to_ullong.pass.cpp test ↵Jonathan Wakely1-0/+1
(#149149) This was added to to_ulong.pass.cpp years ago by cf1dc8d39e2c9870468ca86f7956a65c7745fece but I don't think the other part of that commit matters here.
12 days[libc++] Granularize `range_format` and `format_kind` declarations (#148876)William Tran-Viet4-41/+74
While working on #105430 I ran into an issue implementing [[optional.syn]](https://eel.is/c++draft/optional.syn) because of a circular include that looked like the following: `optional -> __format/range_default_formatter.h -> __format/range_formatter.h -> __format/format_context.h -> optional`. Only `format_kind` and `range_format` are needed, and so they looked like candidates to be put into an internal header.
12 days[libc++][Android] Update compiler and sysroot (#148998)Ryan Prichard4-16/+15
* Upgrade from r536225 to r563880. * Upgrade from ab/12644632 to f8b85cc5262c6e5cbc9a92c1bab2b18b32a4c63f, the current HEAD commit of https://android.googlesource.com/platform/prebuilts/ndk/+/refs/heads/mirror-goog-main-ndk The previous source of sysroots (ci.android.com), deleted its artifacts after a short period of time, and is currently out-of-date because of the aosp-main turndown. Updating the Docker image also fixes two tests.
12 daysMinor formatting fix in 'generate_feature_test_macro_components' (#148889)Steve O'Brien76-76/+0
Fixes a small annoyance where generated files have a format which does not agree with the one checked during `code-formatter` in CI. For example `libcxx-generate-files` updates (among possibly others) the `*.version.compile.pass.cpp` files. Previously these files contained an extra newline which would fail the code format check. If you update that file manually to remove just that extra trailing newline, then `check-generated-output` will fail due to the file's contents differing from what's expected. Contains a number of changes: one actual change to the py script, and lots of resulting whitespace changes. My process for this was: * Update `generate_feature_test_macro_components`: just remove an extra newline which causes the code-format step to fail * Run `$NINJA libcxx-generate-files` to rebuild all these `.version.pass.cpp`'s * Watch this PR's CI run to ensure things pass (i.e. this didn't break things worse)
12 days[libc++] Simplify __hash_table further (#148375)Nikolas Klauser3-149/+34
13 days[Clang] Diagnose forming references to nullptr (#143667)Corentin Jabot1-2/+2
Per [decl.ref], > Because a null pointer value or a pointer past the end of an object does not point to an object, a reference in a well-defined program cannot refer to such things. Note this does not fixes the new bytecode interpreter. Fixes #48665
13 daysRemove workarounds for NDK versions before 2017's r16. (#148879)enh-google4-49/+0
13 days[libc++] Implement _LIBCPP_SUPPRESS_DEPRECATED macros in terms of ↵Nikolas Klauser1-11/+6
_LIBCPP_DIAGNOSTIC macros (#143857) This makes the code a bit more consistent, since we use the `_LIBCPP_DIAGNOSTIC` macros everywhere else.
13 days[libc++][NFC] Remove some __tree internal accessor functions (#147266)Nikolas Klauser1-53/+47
13 days[libc++] Update polymorphic_allocator to never contain a nullptr (#148423)Nikolas Klauser5-29/+79
According to `[mem.poly.allocator.ctor]` the pointer contained in `polymorphic_allocator` can never be null. The default constructor uses `get_default_resource()`, which never returns null and the constructor taking a pointer explicitly has a precondition that the pointer is non-null. This patch adds a warning and an assertion in case a user passes a null pointer to `polymorphic_allocator` as well as marking `resource()` to never return null. This also fixes some tests which contained UB. Fixes #148420
13 days[libc++] Always initialize __tree::{,const_}iterator (#147167)Nikolas Klauser2-12/+55
This was probably added to support https://wg21.link/n3644 but there's no reason not to initialize the pointer in all standard modes. This is technically an extension since n3644 only required value-initialized iterators to be comparable, but supporting this as an extension should be uncontroversial since it avoids potential reads of uninitialized memory in C++03/C++11 without doing any harm.
13 days[libc++] Simplify std::launder (#147985)Nikolas Klauser2-10/+7
Both Clang and GCC diagnose invalid calls to `__builtin_launder`, which causes duplicate diagnostics when using `std::launder` in an invalid way. While the diagnostic message for the builtin isn't perferct, it's definitely good enough to understand the problem and adding our own diagnostic doesn't really make things any clearer. Because of that, this patch simply removes the `static_assert`s and lets the compiler handle diagnosing incorrect arguments instead. This not only simplifies our implementation, but also improves compile times a bit, since we avoid instantiating some type traits.
13 days[libc++] Annotate barrier functions that are defined in the dylib (#148542)Nikolas Klauser2-9/+12
This can improve code gen slightly.
13 days[libc++] Add missing unsupported attributes to hardening timezone tests. ↵Konstantin Varlamov5-0/+9
(#148406) Before this patch, these tests fail under `extensive` and `debug` hardening modes.
13 days[libc++][docs] Add missing entry for status pages, fix bad formatting, and ↵A. Jiang4-12/+13
deduplicate (#148186) In a previously PR, the entry for P3491R3 define_static_{string,object,array} was missing. This patch adds it back. The number of LWG2687, LWG2709, LWG3315, LWG3395, LWG3987, and LWG4113 were duplicated in the title. It seems better to avoid such duplicates. Also fixes some formatting to properly use italic and code styles, and remove one improper leading space from the title of P3682R0 (which caused incorrect alignment in the generated page).
13 days[libc++] Bump Xcode support (#148651)Louis Dionne20-31/+13
Libc++'s policy is to support only the latest released Xcode, which is Xcode 16.x. We did update our CI jobs to Xcode 16.x, but we forgot to update the documentation, which still mentioned Xcode 15. This patch updates the documentation and cleans up outdated mentions of apple-clang-15 in the test suite.
13 days[libc++] Ensure that we restore invariants in basic_filebuf::overflow (#147389)Louis Dionne2-11/+96
In rare circumstances, the invariants could fail to be restored.
14 daysBump version to 22.0.0-gitllvmorg-22-initTobias Hieta1-1/+1
14 daysRevert "[libc++][hardening] Introduce assertion semantics" (#148822)Nikolas Klauser25-342/+67
Reverts llvm/llvm-project#148268 It looks like this was based on #148266, which I reverted in #148787.
14 daysRevert "[libc++][hardening] Introduce a dylib function to log hardening ↵Nikolas Klauser18-156/+0
errors." (#148787) Reverts llvm/llvm-project#148266 I'm reverting this temporarily, since the release branch is today and this is ABI sensitive. Let's wait until after the branch so that we have plenty time to discuss the patch.