[libcxx-commits] [libcxx] [libc++] Add __new_at_least (PR #215813)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 17 04:28:38 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,h -- libcxx/include/__new/new_at_least.h libcxx/test/libcxx/language.support/support.dynamic/libcpp_allocate_at_least.pass.cpp libcxx/include/__configuration/attributes.h libcxx/include/__configuration/availability.h libcxx/include/__memory/allocate_at_least.h libcxx/include/__memory/allocator.h libcxx/include/__new/allocate.h --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/include/__memory/allocate_at_least.h b/libcxx/include/__memory/allocate_at_least.h
index 44d86e013..8dce7692b 100644
--- a/libcxx/include/__memory/allocate_at_least.h
+++ b/libcxx/include/__memory/allocate_at_least.h
@@ -39,8 +39,7 @@ __allocate_at_least(_Alloc& __alloc, size_t __n) {
}
template <class _Tp>
-[[__nodiscard__]] _LIBCPP_CONSTEXPR __allocation_result<_Tp*>
-__allocate_at_least(allocator<_Tp>& __alloc, size_t __n) {
+[[__nodiscard__]] _LIBCPP_CONSTEXPR __allocation_result<_Tp*> __allocate_at_least(allocator<_Tp>& __alloc, size_t __n) {
if (__libcpp_is_constant_evaluated()) {
return {__alloc.allocate(__n), __n};
} else {
``````````
</details>
https://github.com/llvm/llvm-project/pull/215813
More information about the libcxx-commits
mailing list