[libcxx-commits] [libcxx] [libc++] Refactor memory allocation in basic_string (PR #128423)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 23 07:31:32 PST 2025
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 72791fef6d6c84b72cb961b288b25283bea97310 e0ab1dc2ddf5307c22dae81e4b68c286e0617f5a --extensions ,h,cpp -- libcxx/include/__memory/allocate_at_least.h libcxx/include/string libcxx/src/string.cpp libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/string b/libcxx/include/string
index d0d9cd2b13..36da16cc99 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -2323,7 +2323,7 @@ private:
auto __alloc = __str.__alloc_;
auto __allocation = __allocate_long_buffer(__alloc, __str.size());
__replace_internal_buffer(__allocation, __str.size());
- __alloc_ = std::move(__alloc);
+ __alloc_ = std::move(__alloc);
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/128423
More information about the libcxx-commits
mailing list