[libcxx-commits] [libcxx] [libc++] Fix std::pmr::new_delete_resource() returning underaligned pointers (PR #219166)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 27 04:24:15 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.align.pass.cpp libcxx/src/memory_resource.cpp libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/src/memory_resource.cpp b/libcxx/src/memory_resource.cpp
index 4930942e0..cb9700cbb 100644
--- a/libcxx/src/memory_resource.cpp
+++ b/libcxx/src/memory_resource.cpp
@@ -49,9 +49,9 @@ class _LIBCPP_HIDDEN __new_delete_memory_resource_imp : public memory_resource {
void do_deallocate(void* p, size_t bytes, size_t align) override {
#if _LIBCPP_HAS_ALIGNED_ALLOCATION
- ::operator delete(p, align_val_t(align));
+ ::operator delete(p, align_val_t(align));
#else
- ::operator delete(p);
+ ::operator delete(p);
#endif
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/219166
More information about the libcxx-commits
mailing list