[libcxx-commits] [libcxx] Fixed shared_ptr comparisons with nullptr_t when spaceship is unavailable. (PR #76781)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 3 00:24:49 PST 2024
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 8ae73fea3a2cbb072bf3e577dc49deb25b56e760 b2d765362fbf04b8ca1b10c3aa1a3870c5b3b408 -- libcxx/include/__memory/shared_ptr.h libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp
index 8a02b6520d..3281986a42 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp
@@ -99,10 +99,10 @@ int main(int, char**)
assert(!(nullptr > p3));
assert((p3 >= nullptr));
assert(!(nullptr >= p3));
-#if TEST_STD_VER > 17
+# if TEST_STD_VER > 17
assert((nullptr <=> p3) == std::strong_ordering::less);
assert((p3 <=> nullptr) == std::strong_ordering::greater);
-#endif
+# endif
const std::shared_ptr<int[]> p4;
assert((p4 == nullptr));
@@ -115,9 +115,9 @@ int main(int, char**)
assert(!(nullptr > p4));
assert((p4 >= nullptr));
assert((nullptr >= p4));
-#if TEST_STD_VER > 17
+# if TEST_STD_VER > 17
assert((nullptr <=> p4) == std::strong_ordering::equivalent);
-#endif
+# endif
#endif
return 0;
``````````
</details>
https://github.com/llvm/llvm-project/pull/76781
More information about the libcxx-commits
mailing list