diff options
Diffstat (limited to 'libcxx/test/std/language.support/support.exception')
19 files changed, 57 insertions, 19 deletions
diff --git a/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp index c4e1cc7a1ab..e5f4fbe6dcf 100644 --- a/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp @@ -12,7 +12,7 @@ #include <type_traits> #include <cassert> -int main() +int main(int, char**) { static_assert((std::is_base_of<std::exception, std::bad_exception>::value), "std::is_base_of<std::exception, std::bad_exception>::value"); @@ -23,4 +23,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp index c03f4bbfd4f..972649579b1 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp @@ -26,7 +26,7 @@ public: friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { { std::nested_exception e0; @@ -59,4 +59,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp index cc8c9985622..9d65f5fb22b 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp @@ -26,7 +26,7 @@ public: friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { { std::nested_exception e0; @@ -57,4 +57,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp index 5aa762cf7ca..a96c3d015a1 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp @@ -26,7 +26,7 @@ public: friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { { std::nested_exception e; @@ -55,4 +55,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp index 426ea55bff9..01ef7ade7c2 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp @@ -56,7 +56,7 @@ class E1 : public std::nested_exception {}; class E2 : public std::nested_exception {}; class E : public E1, public E2 {}; -int main() +int main(int, char**) { { try @@ -131,4 +131,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp index ba81b8fe3af..204c3b567e7 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp @@ -31,7 +31,7 @@ void go_quietly() std::exit(0); } -int main() +int main(int, char**) { { try @@ -67,4 +67,6 @@ int main() assert(false); } } + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp index c0bc423b01b..b63053c3304 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp @@ -42,7 +42,7 @@ public: struct Final final {}; #endif -int main() +int main(int, char**) { { try @@ -128,4 +128,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp index f77636c8475..1f764da05d6 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp index 2ec624ba654..851d93bc0c8 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp @@ -15,10 +15,12 @@ void f1() {} void f2() {} -int main() +int main(int, char**) { std::set_terminate(f1); assert(std::get_terminate() == f1); std::set_terminate(f2); assert(std::get_terminate() == f2); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp index 9eae3a45edf..e4464b9afc1 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp @@ -15,8 +15,10 @@ void f1() {} void f2() {} -int main() +int main(int, char**) { std::set_terminate(f1); assert(std::set_terminate(f2) == f1); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp index 8f889beee8f..2519f0bc9ce 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp @@ -14,9 +14,11 @@ void f() {} -int main() +int main(int, char**) { static_assert((std::is_same<std::terminate_handler, void(*)()>::value), ""); std::terminate_handler p = f; assert(p == &f); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp index 431ad8bf943..4243fb5cadf 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp @@ -17,9 +17,11 @@ void f1() std::exit(0); } -int main() +int main(int, char**) { std::set_terminate(f1); std::terminate(); assert(false); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp b/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp index bfb27418f53..893a7d5b363 100644 --- a/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp @@ -12,7 +12,7 @@ #include <type_traits> #include <cassert> -int main() +int main(int, char**) { static_assert(std::is_polymorphic<std::exception>::value, "std::is_polymorphic<std::exception>::value"); @@ -21,4 +21,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp index 3c265d8bb88..c95368163d4 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp @@ -29,7 +29,7 @@ struct A int A::constructed = 0; -int main() +int main(int, char**) { { std::exception_ptr p = std::current_exception(); @@ -270,4 +270,6 @@ int main() assert(p != nullptr); } assert(A::constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp index 39f2d6014dc..164e7774be9 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp @@ -15,7 +15,7 @@ #include <exception> #include <cassert> -int main() +int main(int, char**) { std::exception_ptr p; assert(p == nullptr); @@ -30,4 +30,6 @@ int main() assert(p3 == nullptr); p3 = nullptr; assert(p3 == nullptr); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp index 3db951d281f..b26212fd136 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp @@ -26,7 +26,7 @@ struct A int A::constructed = 0; -int main() +int main(int, char**) { { std::exception_ptr p = std::make_exception_ptr(A(5)); @@ -52,4 +52,6 @@ int main() assert(A::constructed == 0); } assert(A::constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp index ab2df72e8e8..015dbef224f 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp @@ -26,7 +26,7 @@ struct A int A::constructed = 0; -int main() +int main(int, char**) { { std::exception_ptr p; @@ -60,4 +60,6 @@ int main() assert(A::constructed == 0); } assert(A::constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp index 29087eb153f..61cfc8f11c1 100644 --- a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp @@ -29,7 +29,7 @@ struct B } }; -int main() +int main(int, char**) { try { @@ -42,4 +42,6 @@ int main() assert(!std::uncaught_exception()); } assert(!std::uncaught_exception()); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp index bab33d837e5..c25e4d2e069 100644 --- a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp @@ -41,7 +41,7 @@ struct Outer { int d_; }; -int main () { +int main(int, char**) { assert(std::uncaught_exceptions() == 0); { Outer o(0); @@ -58,4 +58,6 @@ int main () { } } assert(std::uncaught_exceptions() == 0); + + return 0; } |