summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2019-02-04 20:31:13 +0000
committerJF Bastien <jfbastien@apple.com>2019-02-04 20:31:13 +0000
commit2df59c50688c122bbcae7467d3eaf862c3ea3088 (patch)
tree29c9a3e1c54fe76a506ffecc0cc4d8fbaba5cb04 /libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr
parent6fd4e7fe0258ff71fe759535236883ea9060587c (diff)
downloadbcm5719-llvm-2df59c50688c122bbcae7467d3eaf862c3ea3088.tar.gz
bcm5719-llvm-2df59c50688c122bbcae7467d3eaf862c3ea3088.zip
Support tests in freestanding
Summary: Freestanding is *weird*. The standard allows it to differ in a bunch of odd manners from regular C++, and the committee would like to improve that situation. I'd like to make libc++ behave better with what freestanding should be, so that it can be a tool we use in improving the standard. To do that we need to try stuff out, both with "freestanding the language mode" and "freestanding the library subset". Let's start with the super basic: run the libc++ tests in freestanding, using clang as the compiler, and see what works. The easiest hack to do this: In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding'] Run the tests and they all fail. Why? Because in freestanding `main` isn't special. This "not special" property has two effects: main doesn't get mangled, and main isn't allowed to omit its `return` statement. The first means main gets mangled and the linker can't create a valid executable for us to test. The second means we spew out warnings (ew) and the compiler doesn't insert the `return` we omitted, and main just falls of the end and does whatever undefined behavior (if you're luck, ud2 leading to non-zero return code). Let's start my work with the basics. This patch changes all libc++ tests to declare `main` as `int main(int, char**` so it mangles consistently (enabling us to declare another `extern "C"` main for freestanding which calls the mangled one), and adds `return 0;` to all places where it was missing. This touches 6124 files, and I apologize. The former was done with The Magic Of Sed. The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed This works for most tests, though I did have to adjust a few places when e.g. the test runs with `-x c`, macros are used for main (such as for the filesystem tests), etc. Once this is in we can create a freestanding bot which will prevent further regressions. After that, we can start the real work of supporting C++ freestanding fairly well in libc++. <rdar://problem/47754795> Reviewers: ldionne, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits Differential Revision: https://reviews.llvm.org/D57624 llvm-svn: 353086
Diffstat (limited to 'libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr')
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp4
34 files changed, 102 insertions, 34 deletions
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
index b6e444c659f..973aa93df3c 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
@@ -131,7 +131,9 @@ void allocator_tests() {
}
-int main() {
+int main(int, char**) {
compile_tests();
allocator_tests();
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp
index 79064fb09c4..1e1b0846cc2 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp
@@ -78,7 +78,7 @@ struct ConvertibleFromInt {
ConvertibleFromInt(int) : state(FromInt) {}
};
-int main()
+int main(int, char**)
{
// Test for the creation of dangling references when a tuple is used to
// store a reference to another tuple as its only element.
@@ -174,4 +174,6 @@ int main()
std::tuple<VT> t2 = {t1};
assert(std::get<0>(t2).state == VT::FromInt);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp
index 8992f7b8205..919d88e46a3 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp
@@ -57,7 +57,7 @@ struct ExplicitUnconstrainedCtor {
};
-int main() {
+int main(int, char**) {
typedef UnconstrainedCtor A;
typedef ExplicitUnconstrainedCtor ExplicitA;
{
@@ -94,4 +94,6 @@ int main() {
std::tuple<ExplicitA&&> t2(std::forward_as_tuple(ExplicitA{}));
((void)t2);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp
index 9f8658aa642..1493f4f8160 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp
@@ -29,7 +29,7 @@ extern IncompleteType inc2;
IncompleteType const& cinc1 = inc1;
IncompleteType const& cinc2 = inc2;
-int main() {
+int main(int, char**) {
using IT = IncompleteType;
{ // try calling tuple(Tp const&...)
using Tup = std::tuple<const IT&, const IT&>;
@@ -43,6 +43,8 @@ int main() {
assert(&std::get<0>(t) == &inc1);
assert(&std::get<1>(t) == &inc2);
}
+
+ return 0;
}
struct IncompleteType {};
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp
index b0dd392f171..6c44f7027ee 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp
@@ -44,7 +44,7 @@ struct ExplicitDerived : std::tuple<T> {
explicit operator std::tuple<U>() && { ++count; return {}; }
};
-int main() {
+int main(int, char**) {
{
std::tuple<Explicit> foo = Derived<int>{42}; ((void)foo);
assert(count == 1);
@@ -84,4 +84,6 @@ int main() {
}
count = 0;
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp
index 3a0e0f888e9..3b9d0beead9 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp
@@ -42,9 +42,11 @@ public:
bool operator< (const MoveOnly& x) const {return data_ < x.data_;}
};
-int main()
+int main(int, char**)
{
{
std::tuple<MoveOnly> t = 1;
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp
index f43e6d8bced..916255c967a 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp
@@ -102,7 +102,7 @@ void test_default_constructible_extension_sfinae()
#endif
}
-int main()
+int main(int, char**)
{
{
std::tuple<MoveOnly> t(MoveOnly(0));
@@ -156,4 +156,6 @@ int main()
// Check that SFINAE is properly applied with the default reduced arity
// constructor extensions.
test_default_constructible_extension_sfinae();
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp
index e4ed4769002..c5f52a92846 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp
@@ -39,7 +39,7 @@ struct NonDefaultConstructible {
struct DerivedFromAllocArgT : std::allocator_arg_t {};
-int main()
+int main(int, char**)
{
{
std::tuple<> t(std::allocator_arg, A1<int>());
@@ -105,4 +105,6 @@ int main()
std::tuple<T, T> t2(42, 42);
(void)t2;
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
index 99155823b3a..57e2f1b4188 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
@@ -77,7 +77,7 @@ struct Explicit {
explicit Explicit(int x) : value(x) {}
};
-int main()
+int main(int, char**)
{
{
std::tuple<Explicit> t{std::allocator_arg, std::allocator<void>{}, 42};
@@ -148,4 +148,6 @@ int main()
// ensure that the "reduced-arity-initialization" extension is not offered
// for these constructors.
test_uses_allocator_sfinae_evaluation();
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp
index 1759ba4f3c4..76f99e1978d 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp
@@ -35,8 +35,10 @@ std::tuple<ExplicitCopy> non_const_explicity_copy_test() {
return {std::allocator_arg, std::allocator<void>{}, e};
// expected-error@-1 {{chosen constructor is explicit in copy-initialization}}
}
-int main()
+int main(int, char**)
{
const_explicit_copy_test();
non_const_explicity_copy_test();
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp
index 10647a49d14..3b5b27f7b15 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp
@@ -40,7 +40,7 @@ std::tuple<ImplicitCopy> testImplicitCopy2() {
return {std::allocator_arg, std::allocator<void>{}, i};
}
-int main()
+int main(int, char**)
{
{
// check that the literal '0' can implicitly initialize a stored pointer.
@@ -94,4 +94,6 @@ int main()
assert(!alloc_last::allocator_constructed);
assert(std::get<2>(t) == alloc_last(3));
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp
index baafee879f9..a7cffa72db6 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp
@@ -23,7 +23,7 @@
#include "../alloc_first.h"
#include "../alloc_last.h"
-int main()
+int main(int, char**)
{
{
typedef std::pair<long, int> T0;
@@ -55,4 +55,6 @@ int main()
assert(std::get<0>(t1) == 2);
assert(std::get<1>(t1) == 3);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp
index 8d0482859a0..ca9518d6b2b 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp
@@ -36,7 +36,9 @@ std::tuple<ExplicitCopy> non_const_explicit_copy_test() {
// expected-error@-1 {{chosen constructor is explicit in copy-initialization}}
}
-int main()
+int main(int, char**)
{
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp
index bcece609830..083e15797f6 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp
@@ -33,7 +33,7 @@ struct Implicit {
Implicit(int x) : value(x) {}
};
-int main()
+int main(int, char**)
{
{
typedef std::tuple<long> T0;
@@ -86,4 +86,6 @@ int main()
std::tuple<Implicit> t2 = {std::allocator_arg, std::allocator<void>{}, t1};
assert(std::get<0>(t2).value == 42);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp
index ed485c90107..7a2a5ffff5d 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp
@@ -29,7 +29,9 @@ std::tuple<ExplicitCopy> explicit_move_test() {
// expected-error@-1 {{chosen constructor is explicit in copy-initialization}}
}
-int main()
+int main(int, char**)
{
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp
index e86ec8aea92..1f33ef2fc6e 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp
@@ -49,7 +49,7 @@ struct Implicit {
Implicit(int x) : value(x) {}
};
-int main()
+int main(int, char**)
{
{
typedef std::tuple<int> T0;
@@ -100,4 +100,6 @@ int main()
std::tuple<Implicit> t2 = {std::allocator_arg, std::allocator<void>{}, std::move(t1)};
assert(std::get<0>(t2).value == 42);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp
index 19829a967bb..1db842b8d91 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp
@@ -22,7 +22,7 @@
#include "../alloc_first.h"
#include "../alloc_last.h"
-int main()
+int main(int, char**)
{
{
typedef std::tuple<> T;
@@ -77,4 +77,6 @@ int main()
assert(std::get<2>(t) == 3);
}
#endif
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp
index c77484de54b..fc25a4fc6a4 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp
@@ -23,7 +23,7 @@
#include "../alloc_first.h"
#include "../alloc_last.h"
-int main()
+int main(int, char**)
{
{
typedef std::tuple<> T;
@@ -76,4 +76,6 @@ int main()
assert(std::get<2>(t) == 3);
}
#endif
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp
index 3da2d8a466d..e45702d88b7 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp
@@ -39,7 +39,7 @@ struct D
explicit D(int i) : B(i) {}
};
-int main()
+int main(int, char**)
{
{
typedef std::pair<int, std::unique_ptr<D>> T0;
@@ -51,4 +51,6 @@ int main()
assert(std::get<0>(t1) == 2);
assert(std::get<1>(t1)->id_ == 3);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp
index 2a405c1a4af..bb7c5573505 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp
@@ -42,6 +42,8 @@ std::tuple<ExplicitCopy> const_explicit_copy_no_brace() {
// expected-error@-1 {{no viable conversion}}
}
-int main()
+int main(int, char**)
{
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
index 955a83a6e88..d4c29c93c37 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
@@ -76,7 +76,7 @@ std::tuple<ImplicitCopy> testImplicitCopy3() {
return i;
}
-int main()
+int main(int, char**)
{
{
// check that the literal '0' can implicitly initialize a stored pointer.
@@ -159,4 +159,6 @@ int main()
assert(std::get<3>(t) == 0.0);
}
#endif
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp
index 35e82277f8d..8804c27b8a2 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp
@@ -18,9 +18,11 @@
#include <string>
#include <cassert>
-int main()
+int main(int, char**)
{
{
std::tuple<int, char*, std::string, double&> t(2, nullptr, "text");
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp
index 0fd29b22fd7..bbe51e39254 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp
@@ -20,7 +20,7 @@
#include "test_macros.h"
-int main()
+int main(int, char**)
{
{
typedef std::pair<long, char> T0;
@@ -42,4 +42,6 @@ int main()
static_assert(std::get<1>(t1) == short('a'), "");
}
#endif
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp
index 98d002b8042..41f73328ab7 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp
@@ -64,7 +64,7 @@ struct C
#endif
-int main()
+int main(int, char**)
{
{
typedef std::tuple<long> T0;
@@ -136,4 +136,6 @@ int main()
std::tuple<Implicit> t2 = t1;
assert(std::get<0>(t2).value == 42);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp
index 79332841eb8..071f13cf913 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp
@@ -44,7 +44,7 @@ struct D
explicit D(int i) : B(i) {}
};
-int main()
+int main(int, char**)
{
{
typedef std::tuple<long> T0;
@@ -100,4 +100,6 @@ int main()
std::tuple<Implicit> t2 = std::move(t1);
assert(std::get<0>(t2).value == 42);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp
index f82dc6b1ff2..7eeb65a8fdd 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp
@@ -19,11 +19,13 @@
#include "MoveOnly.h"
-int main()
+int main(int, char**)
{
{
typedef std::tuple<MoveOnly> T;
T t0(MoveOnly(2));
T t = t0;
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp
index 7c581cb7714..01278130400 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp
@@ -22,7 +22,7 @@
struct Empty {};
-int main()
+int main(int, char**)
{
{
typedef std::tuple<> T;
@@ -66,4 +66,6 @@ int main()
((void)e); // Prevent unused warning
}
#endif
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
index 15bcde7e973..ae296f73945 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
@@ -44,7 +44,7 @@ struct IllFormedDefault {
int value;
};
-int main()
+int main(int, char**)
{
{
std::tuple<> t;
@@ -106,4 +106,6 @@ int main()
IllFormedDefault v(0);
std::tuple<IllFormedDefault> t(v);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
index 1d4779aae36..80b09b87180 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
@@ -23,7 +23,7 @@
#include <cassert>
#include <type_traits>
-int main()
+int main(int, char**)
{
static_assert(std::is_trivially_destructible<
std::tuple<> >::value, "");
@@ -35,4 +35,6 @@ int main()
std::tuple<std::string> >::value, "");
static_assert(!std::is_trivially_destructible<
std::tuple<int, std::string> >::value, "");
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp
index ea393abafe4..3ff089a0b31 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp
@@ -149,7 +149,9 @@ void test_empty_specialization()
}
}
-int main() {
+int main(int, char**) {
test_primary_template();
test_empty_specialization();
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
index 98a12a972f8..977dc4c3264 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
@@ -80,7 +80,7 @@ void test_sfinae() {
}
}
-int main()
+int main(int, char**)
{
{
typedef std::tuple<> T;
@@ -121,4 +121,6 @@ int main()
test_sfinae<move_only_ebo>();
test_sfinae<move_only_large>();
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp
index 3953ee150a2..635be614b9a 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp
@@ -34,7 +34,7 @@ struct D
explicit D(int i) : B(i) {}
};
-int main()
+int main(int, char**)
{
{
typedef std::pair<long, std::unique_ptr<D>> T0;
@@ -44,4 +44,6 @@ int main()
assert(std::get<0>(t1) == 2);
assert(std::get<1>(t1)->id_ == 3);
}
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp
index 24868515643..bdbe4fc4b44 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp
@@ -95,7 +95,9 @@ void test_const_Types_lazy_sfinae()
assert(std::get<0>(t).value == 42);
}
-int main() {
+int main(int, char**) {
test_tuple_like_lazy_sfinae();
test_const_Types_lazy_sfinae();
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp
index b84dba37899..2f9447f2a7d 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp
@@ -28,8 +28,10 @@
typedef std::array<char, 1256> array_t;
typedef std::tuple<array_t> tuple_t;
-int main()
+int main(int, char**)
{
array_t arr;
tuple_t tup(arr);
+
+ return 0;
}
OpenPOWER on IntegriCloud