1105 Commits

Author SHA1 Message Date
Louis Dionne
eba76ec994 [libc++][NFC] Precise comments in test suite setup 2023-03-17 14:53:24 -04:00
Mark de Wever
866fbb8779 [NFC][libc++] Formats granularized charconv.
Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D146153
2023-03-16 18:56:30 +01:00
Mark de Wever
b2093ca804 [NFC][libc++] Fixes a typo. 2023-03-15 18:03:43 +01:00
Mark de Wever
f7efcaca77 [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
2023-03-15 18:01:53 +01:00
Mark de Wever
d22cab2e11 [libc++][CI] Improves Dockerfile
- Remove temporary apt files
- Removes LLVM16 TODO

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D144575
2023-03-14 17:32:21 +01:00
Nikolas Klauser
43562287a8 [libc++] Granularize <exception>
This patch also updates the moved code to the new style (i.e. formatted, replaced marcos and typedefs)

Reviewed By: ldionne, #libc

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D145095
2023-03-12 22:19:41 +01:00
Nikolas Klauser
70617a1a23 [libc++] Granularize <atomic> includes
Reviewed By: ldionne, Mordante, #libc

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D144255
2023-03-10 13:28:29 +01:00
Ed Maste
720e6297d1 [libc++] Add CI job testing on FreeBSD
Reviewed by: ldionne, Mordante

Differential Revision: https://reviews.llvm.org/D128084
2023-03-09 13:02:44 -05:00
Nikolas Klauser
e65cd4ce83 [libc++] Enable -Wunused-template
Clang wants to enable this flag by default, but libc++ isn't working with it yet.

Reviewed By: Mordante, #libc, #libc_abi, EricWF

Spies: libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D144667
2023-03-08 19:26:49 +01:00
Louis Dionne
a76d781881 [libc++] Add support for .compile.pass.mm and .link.pass.mm tests
Differential Revision: https://reviews.llvm.org/D145193
2023-03-06 09:50:18 -05:00
David Spickett
cbace67345 Revert "[libcxx] Temporarily skip Arm configs"
This reverts commit 8a023fed2f848031769eae804e55eed719cdd12d.

The machine is back online.
2023-03-03 10:59:52 +00:00
David Spickett
8a023fed2f [libcxx] Temporarily skip Arm configs
The machine hosting these agents will be down
for maintenance today.

We (Linaro) will remove this once the agents are back online.
2023-03-03 09:22:17 +00:00
Louis Dionne
62e3f298de [libc++] Use generic-cxx20 instead of apple-cxx20 on Apple CI
apple-cxx20 is equivalent to generic-cxx20, so we don't need it anymore.
It had been introduced when clang-tidy was enabled explicitly from
run-buildbot, but that's not needed anymore since clang-tidy is
enabled from the buildkite pipeline definition.
2023-03-01 15:26:18 -05:00
Shivam kunwar
813e1da974 [libc++] implement move_iterator<T*> should be a random access iterator \n Differntial Revision- https://reviews.llvm.org/D135248 2023-03-01 23:47:00 +05:30
Arthur O'Dwyer
f56dfb78aa [libc++] Fix modules issues on OS X
First, fix a collision with the Point type from MacTypes.h, which was
reported on Slack, 2022-07-31: https://cpplang.slack.com/archives/C2X659D1B/p1659284691275889

Second, rename the meta:: namespace to types::. OSX's "/usr/include/ncurses.h"
defines a `meta` function, and is (for some reason) included in
"<SDK>/usr/include/module.modulemap", so that identifier is off-limits
for us to use in anything that compiles with -fmodules:

    libcxx/test/support/type_algorithms.h:16:11: error: redefinition of 'meta' as different kind of symbol
    namespace meta {
               ^
    <SDK>/usr/include/ncurses.h:603:28: note: previous definition is here
    extern NCURSES_EXPORT(int) meta (WINDOW *,bool);                        /* implemented */
                                ^

Finally, add a CI configuration for modules on OS X to make sure it
does not regress.

Differential Revision: https://reviews.llvm.org/D144915
2023-03-01 10:33:40 -05:00
Nikolas Klauser
4668dd8c4a [libc++] Run clang-tidy in all configurations that are run in the Docker container
Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D143333
2023-02-28 19:14:58 +01:00
Nikolas Klauser
3d4b7a6fa8 [libc++] Add FTM for views::as_rvalue
`views::as_rvalue` was implemented in D137637, but we forgot to set the feature test macro.
Fixes #60986.

Reviewed By: Mordante, #libc

Spies: libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D144781
2023-02-25 18:26:57 +01:00
Nikolas Klauser
6e93bf5f66 [libc++] Remove <experimental/{algorithm,functional}>
The contents of these files have been implemented for at least two releases, so let's remove them according to our policy (https://libcxx.llvm.org/DesignDocs/ExperimentalFeatures.html#id4).

Reviewed By: Mordante, #libc

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D144475
2023-02-24 14:18:12 +01:00
Nikolas Klauser
7ced7e84c0 [libc++][NFC] Replace typedef with using declarations in <__atomic/*>
Reviewed By: Mordante, #libc

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D144259
2023-02-22 14:49:39 +01:00
Mark de Wever
7067aee367 [libc++][CI] Switches to clang-format-16.
Uses an absolute path to the selected binary.
Updates the formatting of two files to match clang-format-16 style.

Depends on D144126

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D144132
2023-02-17 18:03:49 +01:00
Mark de Wever
f7f86451ec [libc++] Improve the format ignorelist generation.
Several improvements
- Only add files that we actually want to format.
- Sort according to a fixed locale.

Some drive-by fixes
- Rename a text file, this avoids a filter exception.
- Adds a some missing source files extensions.
- Removes unused extensions hh, hxx, cc, and cxx from clang-format.

Reviewed By: philnik, #libc

Differential Revision: https://reviews.llvm.org/D144126
2023-02-17 18:01:57 +01:00
Nikolas Klauser
46db8d822e [libc++] Granularize <atomic>
Reviewed By: Mordante, #libc

Spies: arichardson, libcxx-commits, krytarowski

Differential Revision: https://reviews.llvm.org/D142972
2023-02-17 12:44:32 +01:00
Mark de Wever
a41e1ea2a7 [libc++][CI] Starts using Clang 17.
Reviewed By: #libc, ldionne, Mordante

Differential Revision: https://reviews.llvm.org/D143483
2023-02-15 19:19:16 +01:00
Nikolas Klauser
4f15267d3d [libc++][NFC] Replace _LIBCPP_STD_VER > x with _LIBCPP_STD_VER >= x
This change is almost fully mechanical. The only interesting change is in `generate_feature_test_macro_components.py` to generate `_LIBCPP_STD_VER >=` instead. To avoid churn in the git-blame this commit should be added to the `.git-blame-ignore-revs` once committed.

Reviewed By: ldionne, var-const, #libc

Spies: jloser, libcxx-commits, arichardson, arphaman, wenlei

Differential Revision: https://reviews.llvm.org/D143962
2023-02-15 16:52:25 +01:00
Louis Dionne
33d0d1e36f [runtimes] Rename newconfig.py to config.py -- it's not new anymore
Differential Revision: https://reviews.llvm.org/D144031
2023-02-14 17:21:34 -05:00
Nikolas Klauser
800fec13a8 [libc++] Enforce formatting for already formatted and new files and ignore the formatting of tests
It is quite confusing to newcomers that the formatting check gets mostly ignored. To fix that, enforce the formatting for new file and already formatted files, but ignore it for any files that aren't formatted already. We ignore the tests for now, since almost no test is formatted currently, and they are changed almost never.

Reviewed By: ldionne, Mordante, #libc

Spies: arichardson, fedor.sergeev, phosek, sstefan1, libcxx-commits, abrachet

Differential Revision: https://reviews.llvm.org/D142180
2023-02-14 17:28:35 +01:00
Louis Dionne
87cc95a904 [libc++] Implement P2136R3 std::invoke_r
Differential Revision: https://reviews.llvm.org/D143610
2023-02-13 08:46:57 -05:00
Louis Dionne
16a1c85171 [libc++] Implement P1328R1 constexpr std::type_info::operator==
Differential Revision: https://reviews.llvm.org/D143447
2023-02-07 17:03:45 -08:00
Louis Dionne
5206e66a50 [libc++] Fix path to versioned clang-format in the CI job 2023-02-06 19:18:04 -08:00
Louis Dionne
3058cb7433 [libc++] Export CXX and CC env vars in format and documentation CI jobs
This is necessary now that the Docker images don't contain unversionned
clang binaries.
2023-02-06 18:59:30 -08:00
Mark de Wever
e4022b6b87 [libc++][CI] Uses LLVM 17 in Docker.
Updates the LLVM versions used in the Dockerfile. It also removes
obsolete symlinks. This doesn't update the Buildkite jobs, they need to
use the new Docker image before they can be updated.

Reviewed By: ldionne, #libc, philnik

Differential Revision: https://reviews.llvm.org/D143007
2023-02-06 16:27:31 +01:00
Louis Dionne
bad9b85901 [libc++] Remove leftover LIBCXX_ENABLE_CLANG_TIDY in run-buildbot 2023-02-03 17:34:55 -05:00
Louis Dionne
3a0f88c4c2 [libc++] Add a CI configuration to test Modules with LSV enabled
Some clients use libc++ with modules and LSV (Local Submodule Visibility)
enabled, and we see frequent downstream breakage caused by that. Until
modules use LSV by default (which is apparently a desire), add a CI job
that tests this sub-configuration to avoid high cost downstream breakage.

For more information about LSV, see https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150504/128395.html.

Differential Revision: https://reviews.llvm.org/D143273
2023-02-03 17:14:07 -05:00
Chuanqi Xu
226c444b38 [libc++] Remove <experimental/coroutine>
We've been shipping <coroutine> since LLVM 14, so LLVM 17 won't ship
the <experimental/coroutine> header per our policy for removing TSes.

Differential Revision: https://reviews.llvm.org/D108697
2023-01-30 16:32:48 -05:00
Louis Dionne
051bcd4f31 [libc++] Add documentation for reproducing CI issues locally
Differential Revision: https://reviews.llvm.org/D142566
2023-01-26 14:52:20 -05:00
Nikolas Klauser
06385491a6 [libc++] Refactor clang-query checks to clang-tidy checks to get less obscure error messages
Also remove clang-query related code, since it's unused now.

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D141805
2023-01-23 05:01:28 +01:00
Piotr Fusik
898b5c9f5e [NFC] Fix "form/from" typos
Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D142007
2023-01-22 20:05:51 +01:00
Ed Maste
7ec6c62905 [libc++] Add FreeBSD XFAILs in preparation for CI
This at least allows us to stand up libc++ FreeBSD CI and avoid future
regressions.  The failures do need to be addressed, and can be done
iteratively.

Reviewed By: philnik, Mordante

Differential Revision: https://reviews.llvm.org/D141542
2023-01-20 16:49:30 -05:00
Nikolas Klauser
5f6812748e [libc++] Enable clang-tidy from the buildkite pipeline instead of hard-coding it in run-buildbot
Reviewed By: ldionne, #libc, Mordante, emaste

Spies: emaste, Mordante, libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D141294
2023-01-20 17:10:46 +01:00
Nikolas Klauser
e52ce7f554 [libc++] Remove old CI configurations and update the supported compiler versions
`_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` doesn't do anything anymore in C++23 mode, so it's now just a duplicate of the C++23 configuration.
Also add new steps to the post-release checklist for updating the supported compilers.

Reviewed By: ldionne, #libc

Spies: arichardson, libcxx-commits, arphaman

Differential Revision: https://reviews.llvm.org/D133364
2023-01-20 06:04:35 +01:00
Konstantin Varlamov
d94b069a89 [libc++][ranges] Mark completed Ranges papers and issues as done, bump version macro
All C++20 Ranges papers and LWG issues are done, with the exception of
https://wg21.link/P2210R2 ("Superior String Splitting"), and marked as
such.

All of these were already implemented prior to this patch except bumping
the feature test macro `__cpp_lib_ranges` as required by
https://wg21.link/P2325R3 ("Views should not be required to be default
constructible"). Note that, even though P2325R3 was voted into C++23, it
was voted with a recommendation for vendors to retroactively apply the
change to C++20 (see https://github.com/cplusplus/papers/issues/1007).

Differential Revision: https://reviews.llvm.org/D139900
2023-01-17 22:54:00 -08:00
Chuanqi Xu
f900742746 [C++] [Coroutines] Deprecates the '-fcoroutines-ts' flag
According to https://github.com/llvm/llvm-project/issues/59110, the
`-fcoroutines-ts` flag should be deprecated.

Reviewed By: aaron.ballman, philnik

Differential Revision: https://reviews.llvm.org/D141572
2023-01-18 10:26:53 +08:00
Nikolas Klauser
f70a81cced [libc++] Add clang-tidy to the list of possible substitutions for %{clang-tidy}
Most people don't have a versioned clang-tidy locally. This allows them to still run the clang-tidy test if they have a suitable version.

Reviewed By: ldionne, #libc

Spies: libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D141241
2023-01-13 00:16:37 +01:00
James Y Knight
73d94b1916 [Libcxx] Add <source_location> header.
This requires the __builtin_source_location() builtin, as implemented
by GCC and Clang.

Fixes https://github.com/llvm/llvm-project/issues/56363

Differential Revision: https://reviews.llvm.org/D120634
2023-01-11 16:01:30 -05:00
Joe Loser
76b468805c [libc++][utils] Remove unused import in run.py
`import sys` is unused in `libcxx/utils/run.py`: remove it.

Differential Revision: https://reviews.llvm.org/D141331
2023-01-10 13:07:51 -07:00
Mark de Wever
0c731b0c00 [libc++][CI] Fixes robust against ADL for C++03.
This was disabled in D139545.

Reviewed By: philnik, #libc

Differential Revision: https://reviews.llvm.org/D140731
2023-01-08 16:43:23 +01:00
Marek Kurdej
7223bcf04c [libc++] [C++20] [P0415] Constexpr for std::complex.
This patch adds constexpr to <complex> header: operators, member operators, and member functions (real, imag, norm, conj).

https://eel.is/c++draft/complex.numbers
https://wg21.link/p0415

Reviewed By: ldionne, #libc

Spies: philnik, danilaml, Quuxplusone, wmaxey, arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D79555
2023-01-08 15:46:51 +01:00
Mark de Wever
30033bdaf3 [libc++][CI] Improves clang-(tidy|query) selection.
Hardcode the version of the tools used in the test feature script
instead of the tests. By changing the hard-coded location it's
easier to make the location flexible in the future.

Drive-by change
- The minimum required version for clang-query is now 15, which matches
  our future idea as outlined in the Dockerfile.
- The minimum required version for clang-tidy is now 16, which enables
  the new clang-tidy ADL plugin. This plugin is disabled for C++03
  due to false positives when using `noexcept`, which is not an operator
  in C++03.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D139545
2022-12-28 20:01:06 +01:00
Nikolas Klauser
841399a218 [libc++] Add custom clang-tidy checks
Reviewed By: #libc, ldionne

Spies: jwakely, beanz, smeenai, cfe-commits, tschuett, avogelsgesang, Mordante, sstefan1, libcxx-commits, ldionne, mgorny, arichardson, miyuki

Differential Revision: https://reviews.llvm.org/D131963
2022-12-23 15:42:13 +01:00
Mark de Wever
513f094f62 [libc++][CI] Improves buildbot runner.
Adds documentation and shows a help message when running the script
without arguments.

Lands parts of D139545.
2022-12-22 19:49:50 +01:00