<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc++][test] Make `deallocate_size.pass.cpp` MSVC-friendly (#165162)</title>
<updated>2025-10-31T02:07:38+00:00</updated>
<author>
<name>A. Jiang</name>
<email>de34@live.cn</email>
</author>
<published>2025-10-31T02:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73b092ff3398321b91f913c66bf9fe3bbf4d097a'/>
<id>73b092ff3398321b91f913c66bf9fe3bbf4d097a</id>
<content type='text'>
This patch contains several changes to `deallocate_size.pass.cpp`:
1. `static_cast`-ing some parameters to `size_t` to avoid narrowing.
2. Changing the type of loop variable `i` to `unsigned int` avoid
signedness mismatch with the constructor parameter.
3. Separately counting allocations and deallocations in variables
`allocated_` and `deallocated_`, and changing their type to `uint64_t`.
4. Avoiding `assert`-ing count of allocations when a `basic_string` is
allocated, just `assert`-ing after destruction instead.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch contains several changes to `deallocate_size.pass.cpp`:
1. `static_cast`-ing some parameters to `size_t` to avoid narrowing.
2. Changing the type of loop variable `i` to `unsigned int` avoid
signedness mismatch with the constructor parameter.
3. Separately counting allocations and deallocations in variables
`allocated_` and `deallocated_`, and changing their type to `uint64_t`.
4. Avoiding `assert`-ing count of allocations when a `basic_string` is
allocated, just `assert`-ing after destruction instead.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][test] Augment `test_alloc` in `deallocate_size.pass.cpp` (#113638)</title>
<updated>2024-10-29T23:16:03+00:00</updated>
<author>
<name>A. Jiang</name>
<email>de34@live.cn</email>
</author>
<published>2024-10-29T23:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f71ea0e72e2419691e3c67bdbbe338d314ee77c0'/>
<id>f71ea0e72e2419691e3c67bdbbe338d314ee77c0</id>
<content type='text'>
Making it meet the requirements for allocator since C++11. Fixes
#113609.

This PR doesn't make it meet the C++03 allocator requirements, because
that would make the type too verbose and libc++ has backported many
C++11 features to the C++03 mode.

Drive-by: Removes the `TEST_CONSTEXPR_CXX14` on `allocate`/`dealocate`
which is never in effect (and causes IFNDR-ness before C++23), since
these functions modify the namespace-scoped variable `allocated_`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Making it meet the requirements for allocator since C++11. Fixes
#113609.

This PR doesn't make it meet the C++03 allocator requirements, because
that would make the type too verbose and libc++ has backported many
C++11 features to the C++03 mode.

Drive-by: Removes the `TEST_CONSTEXPR_CXX14` on `allocate`/`dealocate`
which is never in effect (and causes IFNDR-ness before C++23), since
these functions modify the namespace-scoped variable `allocated_`.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][string] Add regression test for sized new/delete bug (#110210)</title>
<updated>2024-10-01T05:29:11+00:00</updated>
<author>
<name>Vitaly Buka</name>
<email>vitalybuka@google.com</email>
</author>
<published>2024-10-01T05:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eea5e7e095f945329e9e71c9606075264df8d74f'/>
<id>eea5e7e095f945329e9e71c9606075264df8d74f</id>
<content type='text'>
This is regression test for #90292.

Allocator used in test is very similar to test_allocator.
However, reproducer requires size_type of the string
to be 64bit, but test_allocator uses 32bit.

32bit size_type makes `sizeof(string::__long)` to be 16,
but the alignment issue fixed with #90292 is only triggered
with default `sizeof(string::__long)` which is 24.

Fixes #92128.

---------

Co-authored-by: Louis Dionne &lt;ldionne.2@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is regression test for #90292.

Allocator used in test is very similar to test_allocator.
However, reproducer requires size_type of the string
to be 64bit, but test_allocator uses 32bit.

32bit size_type makes `sizeof(string::__long)` to be 16,
but the alignment issue fixed with #90292 is only triggered
with default `sizeof(string::__long)` which is 24.

Fixes #92128.

---------

Co-authored-by: Louis Dionne &lt;ldionne.2@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
