[libcxx-commits] [libcxx] Fix __split_buffer_pointer_layout compatibility with swift's C++ interop (PR #170957)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 9 08:24:38 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 origin/main HEAD --extensions -- libcxx/include/__split_buffer --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/__split_buffer b/libcxx/include/__split_buffer
index 5355dbbff..c15e529a0 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -74,10 +74,11 @@ public:
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer_pointer_layout()
#if _LIBCPP_STD_VER >= 20
// Prevents Swift compiler's C++ importer from implicitly instantiating this ctor when it's not supported.
- requires (!is_reference_v<allocator_type>)
+ requires(!is_reference_v<allocator_type>)
#endif
- : __back_cap_(nullptr) {}
-
+ : __back_cap_(nullptr) {
+ }
+
_LIBCPP_CONSTEXPR_SINCE_CXX20
_LIBCPP_HIDE_FROM_ABI explicit __split_buffer_pointer_layout(const allocator_type& __alloc)
: __back_cap_(nullptr), __alloc_(__alloc) {}
``````````
</details>
https://github.com/llvm/llvm-project/pull/170957
More information about the libcxx-commits
mailing list