[libcxx-commits] [libcxx] c72f22b - [libc++] Fix signature of main() in tests
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 28 12:38:08 PDT 2022
Author: Louis Dionne
Date: 2022-06-28T15:38:02-04:00
New Revision: c72f22bf16ffc77b936b3bac6e16b28ef647663e
URL: https://github.com/llvm/llvm-project/commit/c72f22bf16ffc77b936b3bac6e16b28ef647663e
DIFF: https://github.com/llvm/llvm-project/commit/c72f22bf16ffc77b936b3bac6e16b28ef647663e.diff
LOG: [libc++] Fix signature of main() in tests
Otherwise, this breaks freestanding builds, where `main()` isn't mangled
specially and we need to assume that we have a `int main(int, char**)`
entry point in each test for things to work.
Added:
Modified:
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_copy.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_move.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_copy.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_move.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_copy.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_move.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_move_pair.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_move_pair.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/non_const_pair.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_copy.pass.cpp
index d32bfe45a778..613080ad57ee 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_copy.pass.cpp
@@ -32,7 +32,7 @@ static_assert(!std::is_assignable_v<const std::tuple<int&, int&>&, const std::tu
static_assert(!std::is_assignable_v<const std::tuple<int&>&, const std::tuple<long&, long&>&>);
// (is_assignable_v<const Types&, const UTypes&> && ...) is true
-static_assert(std::is_assignable_v<const std::tuple<AssignableFrom<ConstCopyAssign>>&,
+static_assert(std::is_assignable_v<const std::tuple<AssignableFrom<ConstCopyAssign>>&,
const std::tuple<ConstCopyAssign>&>);
static_assert(std::is_assignable_v<const std::tuple<AssignableFrom<ConstCopyAssign>, ConstCopyAssign>&,
@@ -74,7 +74,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
// gcc cannot have mutable member in constant expression
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_move.pass.cpp
index 41dfe5424cbe..3da71b654681 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_convert_move.pass.cpp
@@ -73,7 +73,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
// gcc cannot have mutable member in constant expression
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_copy.pass.cpp
index 38449553bd59..f073afbf2f05 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_copy.pass.cpp
@@ -66,7 +66,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
// gcc cannot have mutable member in constant expression
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_move.pass.cpp
index aeb71a56c2c4..9f81dddd3914 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_move.pass.cpp
@@ -69,7 +69,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
// gcc cannot have mutable member in constant expression
#if !defined(TEST_COMPILER_GCC)
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_copy.pass.cpp
index 67d16df26fbb..c98755df5c21 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_copy.pass.cpp
@@ -78,7 +78,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
// gcc cannot have mutable member in constant expression
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_move.pass.cpp
index 44dcb7022973..99d604402d82 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair_move.pass.cpp
@@ -78,7 +78,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
// gcc cannot have mutable member in constant expression
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_move_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_move_pair.pass.cpp
index 10b7e2a5dfe1..539c50526e7f 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_move_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_move_pair.pass.cpp
@@ -106,7 +106,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
static_assert(test());
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
index 86761b5044fb..f2073257077a 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
@@ -103,7 +103,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
static_assert(test());
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_move_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_move_pair.pass.cpp
index 5c5b20d6d755..2a99860b6d72 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_move_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_move_pair.pass.cpp
@@ -85,7 +85,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
static_assert(test());
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/non_const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/non_const_pair.pass.cpp
index 18d41b6376e2..0652d8956203 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/non_const_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/non_const_pair.pass.cpp
@@ -84,7 +84,7 @@ constexpr bool test() {
return true;
}
-int main() {
+int main(int, char**) {
test();
static_assert(test());
More information about the libcxx-commits
mailing list