[libcxx-commits] [libcxx] [libc++][NFC] Simplify string a bit (PR #127135)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 13 14:16:11 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 79fff6aa324c560f4a32d5d2b0276744a2c49668 079ecc338c579b324d5ba047d886927e5a848027 --extensions -- libcxx/include/string
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/string b/libcxx/include/string
index 9dfe7aa404..1ca191ee01 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -1045,7 +1045,7 @@ public:
// Turning off ASan instrumentation for variable initialization with _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
// does not work consistently during initialization of __r_, so we instead unpoison __str's memory manually first.
// __str's memory needs to be unpoisoned only in the case where it's a short string.
- : __rep_([](basic_string& __s) -> decltype(__s.__rep_) && {
+ : __rep_([](basic_string& __s) -> decltype(__s.__rep_)&& {
if (!__s.__is_long())
__s.__annotate_delete();
return std::move(__s.__rep_);
``````````
</details>
https://github.com/llvm/llvm-project/pull/127135
More information about the libcxx-commits
mailing list