Revision tags: llvmorg-21-init |
|
#
733a98db |
| 21-Jan-2025 |
A. Jiang <de34@live.cn> |
[libc++] Fix input-only range handling for `vector` (#116157)
Changes:
- Carve out sized but input-only ranges for C++23.
- Call `std::move` for related functions when the iterator is possibly inp
[libc++] Fix input-only range handling for `vector` (#116157)
Changes:
- Carve out sized but input-only ranges for C++23.
- Call `std::move` for related functions when the iterator is possibly input-only.
Fixes #115727
show more ...
|
Revision tags: llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
59890c13 |
| 17-Dec-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <new> includes (#119964)
|
#
9474e094 |
| 13-Dec-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Granularize the <new> header (#119270)
This disentangles the code which previously had a mix of many #ifdefs, a
non-versioned namespace and a versioned namespace. It also makes it
clearer
[libc++] Granularize the <new> header (#119270)
This disentangles the code which previously had a mix of many #ifdefs, a
non-versioned namespace and a versioned namespace. It also makes it
clearer which parts of <new> are implemented on Windows by including <new.h>.
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
5c3befb9 |
| 14-Nov-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Add forgotten call to std::__to_address in __uninitialized_allocator_relocate
|
#
6721bcfd |
| 14-Nov-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Accept iterators instead of raw pointers in __uninitialized_allocator_relocate (#114552)
This generalizes the algorithm a bit. Unfortunately, we can't make
the call sites cleaner inside s
[libc++] Accept iterators instead of raw pointers in __uninitialized_allocator_relocate (#114552)
This generalizes the algorithm a bit. Unfortunately, we can't make
the call sites cleaner inside std::vector because the arguments being
passed can all be fancy pointers, which may not be contiguous iterators.
show more ...
|
#
de87dda2 |
| 04-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Use more appropriate type traits for a few cases (#114025)
|
#
30213e99 |
| 03-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Use enable_if_t to constrain make_unique{,_for_overwrite} (#95044)
This improves the diagnostics a bit by using `enable_if_t` which clang is aware of, instead of a custom SFINAE class, as w
[libc++] Use enable_if_t to constrain make_unique{,_for_overwrite} (#95044)
This improves the diagnostics a bit by using `enable_if_t` which clang is aware of, instead of a custom SFINAE class, as well as writing the functions in a more canonical style.
As a drive-by this also makes `__is_{,un}bounded_array` variable templates instead of class templates.
show more ...
|
Revision tags: llvmorg-19.1.3 |
|
#
71315698 |
| 28-Oct-2024 |
serge-sans-paille <sguelton@mozilla.com> |
[clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434)
This implements a warning that's similar to what GCC does in that
context: both memcpy and memset require their first and se
[clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434)
This implements a warning that's similar to what GCC does in that
context: both memcpy and memset require their first and second operand
to be trivially copyable, let's warn if that's not the case.
show more ...
|
Revision tags: llvmorg-19.1.2 |
|
#
ba87515f |
| 12-Oct-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][RFC] Always define internal feature test macros (#89178)
Currently, the library-internal feature test macros are only defined if
the feature is not available, and always have the prefix
`
[libc++][RFC] Always define internal feature test macros (#89178)
Currently, the library-internal feature test macros are only defined if
the feature is not available, and always have the prefix
`_LIBCPP_HAS_NO_`. This patch changes that, so that they are always
defined and have the prefix `_LIBCPP_HAS_` instead. This changes the
canonical use of these macros to `#if _LIBCPP_HAS_FEATURE`, which means
that using an undefined macro (e.g. due to a missing include) is
diagnosed now. While this is rather unlikely currently, a similar change
in `<__configuration/availability.h>` caught a few bugs. This also
improves readability, since it removes the double-negation of `#ifndef
_LIBCPP_HAS_NO_FEATURE`.
The current patch only touches the macros defined in `<__config>`. If
people are happy with this approach, I'll make a follow-up PR to also
change the macros defined in `<__config_site>`.
show more ...
|
#
19c6958d |
| 03-Oct-2024 |
A. Jiang <de34@live.cn> |
[libc++] Re-apply LWG3870: Remove `voidify` (#110944)
This reverts commit f3d58f4161b86a479f68acb453e9622911c688a0.
Relands #110355.
|
#
f3d58f41 |
| 01-Oct-2024 |
Michael Buch <michaelbuch12@gmail.com> |
Revert "[libc++] LWG3870: Remove `voidify` (#110355)" (#110587)
This reverts commit 78f9a8b82d772ff04a12ef95f2c9d31ee8f3e409.
This caused the LLDB test `TestDataFormatterGenericOptional.py` to fa
Revert "[libc++] LWG3870: Remove `voidify` (#110355)" (#110587)
This reverts commit 78f9a8b82d772ff04a12ef95f2c9d31ee8f3e409.
This caused the LLDB test `TestDataFormatterGenericOptional.py` to fail, and we need
a bit more time to look into it.
show more ...
|
Revision tags: llvmorg-19.1.1 |
|
#
78f9a8b8 |
| 30-Sep-2024 |
A. Jiang <de34@live.cn> |
[libc++] LWG3870: Remove `voidify` (#110355)
Instead of changing the cast sequence to implicit conversion in
_`voidify`_, I think it is better to totally remove `__voidify` and use
`static_cast` t
[libc++] LWG3870: Remove `voidify` (#110355)
Instead of changing the cast sequence to implicit conversion in
_`voidify`_, I think it is better to totally remove `__voidify` and use
`static_cast` to `void*`, which has equivalent effects.
Test coverage for const iterators are removed.
Now most affected algorithms are underconstrained, for which I submitted
[LWG3888](https://cplusplus.github.io/LWG/issue3888). I'm not sure
whether we should speculatively implement it at this moment, and thus
haven't added any `*.verify.cpp`.
In some control block types and `optional`, the stored objects are
changed to have cv-unqualified type.
Fixes #105119.
show more ...
|
Revision tags: llvmorg-19.1.0 |
|
#
e4fdbcc2 |
| 04-Sep-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Add miscellaneous missing includes
|
Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
85da39de |
| 15-Aug-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove the allocator<const T> extension (#102655)
In LLVM 19 removed the extension with an opt-in macro. This finally
removes that option too and removes a few `const_cast`s where I know
[libc++] Remove the allocator<const T> extension (#102655)
In LLVM 19 removed the extension with an opt-in macro. This finally
removes that option too and removes a few `const_cast`s where I know
that they exist only to support this extension.
show more ...
|
Revision tags: 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 |
|
#
580f6048 |
| 18-Mar-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Merge is{,_nothrow,_trivially}{,_copy,_move,_default}{_assignable,_constructible} (#85308)
These headers have become very small by using compiler builtins, often
containing only two d
[libc++][NFC] Merge is{,_nothrow,_trivially}{,_copy,_move,_default}{_assignable,_constructible} (#85308)
These headers have become very small by using compiler builtins, often
containing only two declarations. This merges these headers, since
there doesn't seem to be much of a benefit keeping them separate.
Specifically, `is_{,_nothrow,_trivially}{assignable,constructible}` are
kept and the `copy`, `move` and `default` versions of these type traits
are moved in to the respective headers.
show more ...
|
Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3 |
|
#
76a24727 |
| 20-Feb-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Refactor more __enable_ifs to the canonical style (#81457)
This brings the code base closer to having only a single style of
`enable_if`s.
|
Revision tags: llvmorg-18.1.0-rc2 |
|
#
e2cfdf7b |
| 05-Feb-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Fix vector<const T> (#80711)
#80558 introduced code that assumed that the element type of `vector` is
never const. This fixes it and adds a test. Eventually we should remove
the `allocato
[libc++] Fix vector<const T> (#80711)
#80558 introduced code that assumed that the element type of `vector` is
never const. This fixes it and adds a test. Eventually we should remove
the `allocator<const T>` extension.
show more ...
|
#
4e112e5c |
| 03-Feb-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
Reapply "[libc++] Optimize vector growing of trivially relocatable types" (#80558)
This reapplies #76657. Non-trivial elements didn't get destroyed
previously. This fixes the bug and adds tests for
Reapply "[libc++] Optimize vector growing of trivially relocatable types" (#80558)
This reapplies #76657. Non-trivial elements didn't get destroyed
previously. This fixes the bug and adds tests for all the vector
insertion functions.
show more ...
|
#
2352fdd2 |
| 02-Feb-2024 |
Kirill Stoimenov <kstoimenov@google.com> |
Revert "[libc++] Optimize vector growing of trivially relocatable types (#76657)"
Broke sanitizer bots: https://lab.llvm.org/buildbot/#/builders/5/builds/40641
This reverts commit 67eee4a029797c091
Revert "[libc++] Optimize vector growing of trivially relocatable types (#76657)"
Broke sanitizer bots: https://lab.llvm.org/buildbot/#/builders/5/builds/40641
This reverts commit 67eee4a029797c09129889c3655416d1be487cfe.
show more ...
|
#
67eee4a0 |
| 02-Feb-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Optimize vector growing of trivially relocatable types (#76657)
This patch introduces a new trait to represent whether a type is
trivially
relocatable, and uses that trait to optimize the
[libc++] Optimize vector growing of trivially relocatable types (#76657)
This patch introduces a new trait to represent whether a type is
trivially
relocatable, and uses that trait to optimize the growth of a std::vector
of trivially relocatable objects.
```
--------------------------------------------------
Benchmark old new
--------------------------------------------------
bm_grow<int> 1354 ns 1301 ns
bm_grow<std::string> 5584 ns 3370 ns
bm_grow<std::unique_ptr<int>> 3506 ns 1994 ns
bm_grow<std::deque<int>> 27114 ns 27209 ns
```
This also changes to order of moving and destroying the objects when
growing the vector. This should not affect our conformance.
show more ...
|
Revision tags: llvmorg-18.1.0-rc1 |
|
#
7b462251 |
| 25-Jan-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Fix missing and incorrect push/pop macros (#79204)
We recently noticed that the unwrap_iter.h file was pushing macros, but
it was pushing them again instead of popping them at the end of t
[libc++] Fix missing and incorrect push/pop macros (#79204)
We recently noticed that the unwrap_iter.h file was pushing macros, but
it was pushing them again instead of popping them at the end of the
file. This led to libc++ basically swallowing any custom definition of
these macros in user code:
#define min HELLO
#include <algorithm>
// min is not HELLO anymore, it's not defined
While investigating this issue, I noticed that our push/pop pragmas were
actually entirely wrong too. Indeed, instead of pushing macros like
`move`, we'd push `move(int, int)` in the pragma, which is not a valid
macro name. As a result, we would not actually push macros like `move`
-- instead we'd simply undefine them. This led to the following code not
working:
#define move HELLO
#include <algorithm>
// move is not HELLO anymore
Fixing the pragma push/pop incantations led to a cascade of issues
because we use identifiers like `move` in a large number of places, and
all of these headers would now need to do the push/pop dance.
This patch fixes all these issues. First, it adds a check that we don't
swallow important names like min, max, move or refresh as explained
above. This is done by augmenting the existing
system_reserved_names.gen.py test to also check that the macros are what
we expect after including each header.
Second, it fixes the push/pop pragmas to work properly and adds missing
pragmas to all the files I could detect a failure in via the newly added
test.
rdar://121365472
show more ...
|
Revision tags: llvmorg-19-init |
|
#
9783f28c |
| 18-Dec-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Format the code base (#74334)
This patch runs clang-format on all of libcxx/include and libcxx/src, in
accordance with the RFC discussed at [1]. Follow-up patches will format
the benchmar
[libc++] Format the code base (#74334)
This patch runs clang-format on all of libcxx/include and libcxx/src, in
accordance with the RFC discussed at [1]. Follow-up patches will format
the benchmarks, the test suite and remaining parts of the code. I'm
splitting this one into its own patch so the diff is a bit easier to
review.
This patch was generated with:
find libcxx/include libcxx/src -type f \
| grep -v 'module.modulemap.in' \
| grep -v 'CMakeLists.txt' \
| grep -v 'README.txt' \
| grep -v 'libcxx.imp' \
| grep -v '__config_site.in' \
| xargs clang-format -i
A Git merge driver is available in libcxx/utils/clang-format-merge-driver.sh
to help resolve merge and rebase issues across these formatting changes.
[1]: https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all
show more ...
|
#
77a00c0d |
| 05-Dec-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Replace uses of _VSTD:: by std:: (#74331)
As part of the upcoming clang-formatting of libc++, this patch performs
the long desired removal of the _VSTD macro.
See https://discourse.llvm
[libc++] Replace uses of _VSTD:: by std:: (#74331)
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.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
7961fa36 |
| 20-Oct-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Fix uninitialized algorithms when using unconstrained comparison operators (#69373)
If an iterator passed to std::uninitialized_copy & friends provided an
unconstrained comparison operator
[libc++] Fix uninitialized algorithms when using unconstrained comparison operators (#69373)
If an iterator passed to std::uninitialized_copy & friends provided an
unconstrained comparison operator, we would trigger an ambiguous
overload resolution because we used to compare against
__unreachable_sentinel in our implementation.
This patch fixes that by only comparing the output iterator when it is
actually required, i.e. in the <ranges> versions of the algorithms.
Fixes #69334
show more ...
|
Revision tags: 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 |
|
#
8100aa4c |
| 11-Jun-2023 |
AdityaK <1894981+hiraditya@users.noreply.github.com> |
[libcxx] Use the unoptimized routines for volatile source types
As reported in: D147741
Reviewers: philnik, var-const, ldionne, hans
Differential Revision: https://reviews.llvm.org/D152571
|