Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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, 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
# 6a54dfbf 31-Jul-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Add missing license headers

Also standardize the license comment in several files where it was
different from what we normally do.


Revision tags: 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
# b29301cd 04-Mar-2024 Po-yao Chang <poyaoc97@gmail.com>

[libc++][format] Handle range-underlying-spec (#81914)

An immediate colon signifeis that the range-format-spec contains only
range-underlying-spec.

This patch allows this code to compile and run

[libc++][format] Handle range-underlying-spec (#81914)

An immediate colon signifeis that the range-format-spec contains only
range-underlying-spec.

This patch allows this code to compile and run:
```c++
std::println("{::<<9?}", std::span<const char>{"Hello", sizeof "Hello"});
```

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 08fe7df6 15-Feb-2024 Po-yao Chang <poyaoc97@gmail.com>

[libc++][format] Don't treat a closing '}' as part of format-spec (#81305)

This allows:
```
std::println("{}>42", std::thread::id{});
std::println("{}>42", std::span<int>{});
std::println("{}>42

[libc++][format] Don't treat a closing '}' as part of format-spec (#81305)

This allows:
```
std::println("{}>42", std::thread::id{});
std::println("{}>42", std::span<int>{});
std::println("{}>42", std::pair{42, "Hello"sv});
std::println("{:}>42", std::thread::id{});
std::println("{:}>42", std::span<int>{});
std::println("{:}>42", std::pair{42, "Hello"sv});
```
to compile and run.

show more ...


Revision tags: 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
# 402eb2ef 04-Jun-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Improves diagnostics.

Improves both the compile-time and run-time errors.
At compile-time it does a bit more work to get more specific errors.
This could be done at run-time too, bu

[libc++][format] Improves diagnostics.

Improves both the compile-time and run-time errors.
At compile-time it does a bit more work to get more specific errors.
This could be done at run-time too, but that has a performance penalty.
Since it's expected most use-cases use format* instead of vformat* the
compile-time errors are more common.

For example when using

std::format_to("{:-c}", 42);

Before compile output would contain

std::__throw_format_error("The format-spec should consume the input or end with a '}'");

Now it contains

std::__throw_format_error("The format specifier does not allow the sign option");

Given a better indication the sign option is not allowed. Note the
output is still not user-friendly; C++ doesn't have good facilities to
generate nice messages from the library.

In general all messages have been reviewed and improved, using a more
consistent style and using less terms used in the standard. For example

format-spec -> format specifier
arg-id -> argument index

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D152624

show more ...


Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, 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, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1
# a9e5773f 03-Apr-2022 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Implements formatting pointer.

The feature is applied as DR instead of a normal paper. MSVC STL and
libstdc++ will do the same.

Implements
- P2510R3 Formatting pointers

Depends on

[libc++][format] Implements formatting pointer.

The feature is applied as DR instead of a normal paper. MSVC STL and
libstdc++ will do the same.

Implements
- P2510R3 Formatting pointers

Depends on D153192

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D153195

show more ...


# 48abcf11 16-Apr-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Adds formattable-with concept.

This change has a few additional effects:
- Abstract classes are now formattable.
- Volatile objects are no longer formattable.

Implements
- LWG3631

[libc++][format] Adds formattable-with concept.

This change has a few additional effects:
- Abstract classes are now formattable.
- Volatile objects are no longer formattable.

Implements
- LWG3631 basic_format_arg(T&&) should use remove_cvref_t<T> throughout
- LWG3925 Concept formattable's definition is incorrect

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D152092

show more ...


# 9b43aede 03-Mar-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Implements LWG3892.

This LWG issue is based on the discussion regarding

P2733R3 Fix handling of empty specifiers in std::format

This paper was disussed and changed a few times i

[libc++][format] Implements LWG3892.

This LWG issue is based on the discussion regarding

P2733R3 Fix handling of empty specifiers in std::format

This paper was disussed and changed a few times in LEWG during the
Issaquah meeting. The paper was not voted in, instead LEWG asked for
a DR against C++26.

This LWG issue contains the direction voted by LEWG. This issue has not
been voted in yet. However it fixes some of the defencies on the
container based formatting. Without this fix the range-default-formatter
for strings looks bad when used in containers.

The changes of this issue match the intended changes of P27333.

type fmt before after (if changed)
---------------------------------------------------------------
char {} a
char {:?} 'a'
array<char, 1> {} ['a']
array<char, 1> {::} [a]
array<char, 1> {::c} [a]
array<char, 1> {::?} ['a']
map<char, char> {} {a: a} -> {'a': 'a'}
map<char, char> {::} {'a': 'a'}
set<char> {} {'a'}
set<char> {::} {a}
set<char> {::c} {a}
set<char> {::?} {'a'}
tuple<char> {} ('a')
stack<char> {} ['a']
stack<char> {::} [a]
stack<char> {::c} [a]
stack<char> {::?} ['a']
array<array<char, 1>, 1> {} [[a]] -> {'a': 'a'}
array<array<char, 1>, 1> {::} [['a']]
array<array<char, 1>, 1> {:::} [[a]]
array<array<char, 1>, 1> {:::c} [[a]]
array<array<char, 1>, 1> {:::?} [['a']]
array<tuple<char>, 1> {} [(a)] -> [('a')]
tuple<tuple<char>> {} ((a)) -> (('a'))
tuple<array<char, 1>> {} ([a]) -> (['a'])

Note the optimization text as mentioned in the tuple formatter can't be
done. The call to parse may affect the formatter so its state needs to
be preserved.

Reviewed By: ldionne, #libc, EricWF

Differential Revision: https://reviews.llvm.org/D145847

show more ...


# 9c8f3409 02-Feb-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Fixes test failures.

Using some builds the modular build fails due to missing exports
and includes. This fixes the build.

Reviewed By: #libc, ldionne

Differential Revision: https:

[libc++][format] Fixes test failures.

Using some builds the modular build fails due to missing exports
and includes. This fixes the build.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D143203

show more ...


# 22e8525d 05-May-2022 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Implements range_formatter

Implements parts of
- P2286R8 Formatting Ranges
- P2585R0 Improving default container formatting

Depends on D140651

Reviewed By: ldionne, #libc

Differe

[libc++][format] Implements range_formatter

Implements parts of
- P2286R8 Formatting Ranges
- P2585R0 Improving default container formatting

Depends on D140651

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D140653

show more ...


# 580cc9dd 01-Jan-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Fixes escaping string literals.

D140653 has the same fix, without the extra tests.

Fixes PR59763

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D1408

[libc++][format] Fixes escaping string literals.

D140653 has the same fix, without the extra tests.

Fixes PR59763

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D140819

show more ...


# bc21af6a 24-Dec-2022 Mark de Wever <koraq@xs4all.nl>

[NFC][libc++][test] Improves code reuse.

This applies D140115 to the new tuple tests.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D140650


# eb6e13cb 05-May-2022 Mark de Wever <koraq@xs4all.nl>

[libc++][format] Adds formatter for tuple and pair

Implements parts of
- P2286R8 Formatting Ranges

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D136775