[libcxx-commits] [libcxx] 3350ec9 - [libc++] Add missing 'return 0' from main functions in tests
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 19 10:43:44 PDT 2023
Author: Louis Dionne
Date: 2023-06-19T13:43:34-04:00
New Revision: 3350ec9b3e9323b31c475b206aec7318d2cb709f
URL: https://github.com/llvm/llvm-project/commit/3350ec9b3e9323b31c475b206aec7318d2cb709f
DIFF: https://github.com/llvm/llvm-project/commit/3350ec9b3e9323b31c475b206aec7318d2cb709f.diff
LOG: [libc++] Add missing 'return 0' from main functions in tests
Added:
Modified:
libcxx/test/libcxx/algorithms/alg.sorting/pstl.is_partitioned.pass.cpp
libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp
libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
libcxx/test/std/utilities/expol/policies.compile.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/algorithms/alg.sorting/pstl.is_partitioned.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/pstl.is_partitioned.pass.cpp
index 7d07ab77b9579..86647ccfdef8e 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/pstl.is_partitioned.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/pstl.is_partitioned.pass.cpp
@@ -26,4 +26,6 @@ int main(int, char**) {
return i < 5;
}));
assert(call_count == std::size(a));
+
+ return 0;
}
diff --git a/libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp b/libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp
index 66b620e9cfc46..eaa5d44385be6 100644
--- a/libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp
@@ -58,7 +58,7 @@ struct Iterator {
T* ptr_;
};
-int main() {
+int main(int, char**) {
int array[5] = {1, 2, 3, 4, 5};
Iterator<int> first(array);
Iterator<int> middle(array + 3);
@@ -74,4 +74,6 @@ int main() {
(void)std::min_element(first, last);
(void)std::minmax_element(first, last);
(void)std::upper_bound(first, last, 3);
+
+ return 0;
}
diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
index 62ef6ff2a4050..debc29a55ee98 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
@@ -163,4 +163,6 @@ int main(int, char**) {
ss.request_stop(); // the callbacks deletes itself. if the destructor blocks, it would be deadlock
assert(holder.callback_ == nullptr);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/expol/policies.compile.pass.cpp b/libcxx/test/std/utilities/expol/policies.compile.pass.cpp
index ebea9d4f5c424..a4cecc4d1dcda 100644
--- a/libcxx/test/std/utilities/expol/policies.compile.pass.cpp
+++ b/libcxx/test/std/utilities/expol/policies.compile.pass.cpp
@@ -47,4 +47,6 @@ int main(int, char**) {
#if TEST_STD_VER >= 20
use(std::execution::unseq);
#endif
+
+ return 0;
}
More information about the libcxx-commits
mailing list