[libcxx-commits] [libcxx] [libc++][test] Fix `size_type` issues with `MinSequenceContainer` and `min_allocator` (PR #126267)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 7 09:18:51 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 4d7192a5ecabb36263a2cacd4e9243b958424805 5071d8abaf0bcc2c81127c9b015ff7ff1af9cdf6 --extensions h -- libcxx/test/support/MinSequenceContainer.h libcxx/test/support/min_allocator.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/support/min_allocator.h b/libcxx/test/support/min_allocator.h
index beee83feb9..d3ee27a23b 100644
--- a/libcxx/test/support/min_allocator.h
+++ b/libcxx/test/support/min_allocator.h
@@ -394,15 +394,9 @@ public:
template <class U>
TEST_CONSTEXPR_CXX20 min_allocator(min_allocator<U>) {}
- TEST_CONSTEXPR_CXX20 pointer allocate(std::size_t n)
- {
- return pointer(std::allocator<T>().allocate(n));
- }
+ TEST_CONSTEXPR_CXX20 pointer allocate(std::size_t n) { return pointer(std::allocator<T>().allocate(n)); }
- TEST_CONSTEXPR_CXX20 void deallocate(pointer p, std::size_t n)
- {
- std::allocator<T>().deallocate(p.ptr_, n);
- }
+ TEST_CONSTEXPR_CXX20 void deallocate(pointer p, std::size_t n) { std::allocator<T>().deallocate(p.ptr_, n); }
TEST_CONSTEXPR_CXX20 friend bool operator==(min_allocator, min_allocator) {return true;}
TEST_CONSTEXPR_CXX20 friend bool operator!=(min_allocator x, min_allocator y) {return !(x == y);}
``````````
</details>
https://github.com/llvm/llvm-project/pull/126267
More information about the libcxx-commits
mailing list