[libcxx-commits] [libcxx] [libc++] Use correct size for deallocation of arrays in shared_ptr (PR #68233)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 4 09:47:21 PDT 2023


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 6cbf6f5d376a06d96bc1320e83d479749873c654 23e66713a43e80a54b0b4e37791f1dfbd136ef93 -- libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp b/libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
index f885c7344..04f534a37 100644
--- a/libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
+++ b/libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
@@ -17,9 +17,9 @@
 #include <memory>
 
 int main() {
-    std::allocate_shared<int64_t[]>(std::allocator<int64_t>{}, 10);
-    std::make_shared<int64_t[]>(10);
+  std::allocate_shared<int64_t[]>(std::allocator<int64_t>{}, 10);
+  std::make_shared<int64_t[]>(10);
 
-    std::allocate_shared<int64_t[10]>(std::allocator<int64_t>{});
-    std::make_shared<int64_t[10]>();
+  std::allocate_shared<int64_t[10]>(std::allocator<int64_t>{});
+  std::make_shared<int64_t[10]>();
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/68233


More information about the libcxx-commits mailing list