[libcxx-commits] [libcxx] [libc++] Move swap test to a .compile.pass.cpp (PR #143167)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 6 09:21:12 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/143167.diff
1 Files Affected:
- (renamed) libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp (+1-3)
``````````diff
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
similarity index 98%
rename from libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
rename to libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
index b83ec3c3c1210..b50e67589471d 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
@@ -52,7 +52,7 @@ struct some_alloc2 {
typedef std::true_type is_always_equal;
};
-int main(int, char**) {
+void f() {
{
typedef std::forward_list<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -83,6 +83,4 @@ int main(int, char**) {
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
#endif
-
- return 0;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/143167
More information about the libcxx-commits
mailing list