diff options
author | JF Bastien <jfbastien@apple.com> | 2019-02-04 20:31:13 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2019-02-04 20:31:13 +0000 |
commit | 2df59c50688c122bbcae7467d3eaf862c3ea3088 (patch) | |
tree | 29c9a3e1c54fe76a506ffecc0cc4d8fbaba5cb04 /libcxx/test/std/input.output/filesystems/class.path/path.member | |
parent | 6fd4e7fe0258ff71fe759535236883ea9060587c (diff) | |
download | bcm5719-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/input.output/filesystems/class.path/path.member')
29 files changed, 83 insertions, 29 deletions
diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp index fb74c8e1946..2f468e59554 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp @@ -311,7 +311,7 @@ void test_sfinae() } } -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : Cases) { @@ -335,4 +335,6 @@ int main() doAppendSourceAllocTest<wchar_t>(TC); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp index eb45c0981d4..aff89f27bd3 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp @@ -22,9 +22,11 @@ #include "count_new.hpp" -int main() { +int main(int, char**) { using namespace fs; path p("abc"); p = {}; assert(p.native() == ""); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp index 04b8f63cbdd..9265c70f6f4 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_copy_assignable<path>::value, ""); static_assert(!std::is_nothrow_copy_assignable<path>::value, "should not be noexcept"); @@ -32,4 +32,6 @@ int main() { assert(p.native() == s); assert(p2.native() == s); assert(&pref == &p2); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp index 12422c68e42..5e5fb1e0e06 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp @@ -22,7 +22,7 @@ #include "count_new.hpp" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_nothrow_move_assignable<path>::value, ""); assert(globalMemCounter.checkOutstandingNewEq(0)); @@ -38,4 +38,6 @@ int main() { assert(p.native() != s); // Testing moved from state assert(&pref == &p2); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp index edc0b263844..9c23e3b3ebf 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp @@ -228,7 +228,7 @@ void RunStringMoveTest(const char* Expect) { } } -int main() { +int main(int, char**) { for (auto const& MS : PathList) { RunTestCase<char>(MS); RunTestCase<wchar_t>(MS); @@ -237,4 +237,6 @@ int main() { RunStringMoveTest(MS); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp index 41efb7513fa..165e62fe4fe 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp @@ -184,7 +184,9 @@ void test_compare_elements() { } } -int main() { +int main(int, char**) { test_compare_basic(); test_compare_elements(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp index 842d70543a0..b074e831e15 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp @@ -325,7 +325,7 @@ void test_sfinae() { } } -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : Cases) { @@ -384,4 +384,6 @@ int main() doConcatECharTest<char32_t>(TC); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp index 789789779a4..1490c0b9fed 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_copy_constructible<path>::value, ""); static_assert(!std::is_nothrow_copy_constructible<path>::value, "should not be noexcept"); @@ -30,4 +30,6 @@ int main() { path p2(p); assert(p.native() == s); assert(p2.native() == s); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp index 203c0e5ee61..b31728da1f9 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp @@ -21,9 +21,11 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_nothrow_default_constructible<path>::value, ""); const path p; assert(p.empty()); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp index 4382de14170..494a77c3c86 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp @@ -22,7 +22,7 @@ #include "count_new.hpp" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_nothrow_move_constructible<path>::value, ""); assert(globalMemCounter.checkOutstandingNewEq(0)); @@ -36,4 +36,6 @@ int main() { assert(p2.native() == s); assert(p.native() != s); // Testing moved from state } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp index b10d3aa88cd..bcb9986cec9 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp @@ -117,7 +117,7 @@ void test_sfinae() { } } -int main() { +int main(int, char**) { for (auto const& MS : PathList) { RunTestCase<char>(MS); RunTestCase<wchar_t>(MS); @@ -125,4 +125,6 @@ int main() { RunTestCase<char32_t>(MS); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp index 481ffcde60f..5248f67515a 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { fs::path c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp index aa511cdf014..be9cefb76a8 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp @@ -208,8 +208,10 @@ void decompFilenameTest() } } -int main() +int main(int, char**) { decompPathTest(); decompFilenameTest(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp index 4d295eec5e6..f1e616542e9 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp @@ -26,7 +26,7 @@ #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { // clang-format off struct { std::string input; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp index 96fa1597b02..7e31956ee50 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp @@ -27,7 +27,7 @@ #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { // clang-format off struct { std::string input; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp index 7cb81ca0008..707a7010ffb 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp @@ -33,7 +33,7 @@ MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR // generic_string<C, T, A> forwards to string<C, T, A>. Tests for // string<C, T, A>() are in "path.native.op/string_alloc.pass.cpp". // generic_string is minimally tested here. -int main() +int main(int, char**) { using namespace fs; using CharT = wchar_t; @@ -51,4 +51,6 @@ int main() assert(Alloc::alloc_count > 0); assert(Alloc::outstanding_alloc() == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp index 2e33769cdb3..04ae673ac48 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp @@ -31,7 +31,7 @@ MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); -int main() +int main(int, char**) { using namespace fs; auto const& MS = longString; @@ -57,4 +57,6 @@ int main() std::u32string s = p.generic_u32string(); assert(s == (const char32_t*)MS); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp index a224dddfa97..01538539faf 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp @@ -24,7 +24,7 @@ #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { using namespace fs; { path p; @@ -40,4 +40,6 @@ int main() { p2.clear(); assert(p2.empty()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp index 43393aba5da..4530ef87554 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp @@ -39,7 +39,7 @@ const MakePreferredTestcase TestCases[] = , {"\\foo\\/bar\\/baz\\"} }; -int main() +int main(int, char**) { // This operation is an identity operation on linux. using namespace fs; @@ -50,4 +50,6 @@ int main() assert(p.native() == TC.value); assert(&Ref == &p); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp index 42191379dbb..7cb562c227f 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp @@ -57,7 +57,7 @@ const RemoveFilenameTestcase TestCases[] = , {"bar/../baz/./file.txt", "bar/../baz/./"} }; -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : TestCases) { @@ -69,4 +69,6 @@ int main() assert(&Ref == &p); assert(!p.has_filename()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp index 70040c48ae5..6fec420baa0 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp @@ -51,7 +51,7 @@ const ReplaceExtensionTestcase NoArgCases[] = , {"foo..cpp", "foo.", ""} }; -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : TestCases) { @@ -68,4 +68,6 @@ int main() assert(p == TC.expect); assert(&Ref == &p); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp index 3635352210b..8142e790731 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp @@ -47,7 +47,7 @@ const ReplaceFilenameTestcase TestCases[] = , {"/foo\\baz/bong", "/foo\\baz/bar", "bar"} }; -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : TestCases) { @@ -67,4 +67,6 @@ int main() ASSERT_EQ(p, p2); } } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp index ac623dbfcc5..2e9dac5e438 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp @@ -41,7 +41,7 @@ const SwapTestcase TestCases[] = #undef LONG_STR1 #undef LONG_STR2 -int main() +int main(int, char**) { using namespace fs; { @@ -76,4 +76,6 @@ int main() } assert(p1 == Val); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp index 3f2fac696da..8b35ee8c80a 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp @@ -23,7 +23,7 @@ #include "filesystem_test_helper.hpp" -int main() +int main(int, char**) { using namespace fs; const char* const value = "hello world"; @@ -38,4 +38,6 @@ int main() assert(p.c_str() == str_value); assert(p.native().c_str() == p.c_str()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp index 0d747b18895..c06de9795e3 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp @@ -32,7 +32,7 @@ MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); -int main() +int main(int, char**) { using namespace fs; auto const& MS = longString; @@ -58,4 +58,6 @@ int main() std::u32string s = p.u32string(); assert(s == (const char32_t*)MS); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp index 14feaf13e8e..3b88b5d6c64 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp @@ -22,7 +22,7 @@ #include "filesystem_test_helper.hpp" -int main() +int main(int, char**) { using namespace fs; const char* const value = "hello world"; @@ -35,4 +35,6 @@ int main() path p(value); assert(p.native() == value); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp index 53fdcc16034..9f0069051fd 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp @@ -23,7 +23,7 @@ #include "filesystem_test_helper.hpp" -int main() +int main(int, char**) { using namespace fs; using string_type = path::string_type; @@ -42,4 +42,6 @@ int main() assert(s == value); assert(p == value); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp index 86453f8d0b9..4ace380b873 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp @@ -116,7 +116,7 @@ void doLongStringTest(MultiStringType const& MS) { ///////////////////////////////////////////////////////////////////////////// } -int main() +int main(int, char**) { using namespace fs; { @@ -133,4 +133,6 @@ int main() doLongStringTest<char16_t>(S); doLongStringTest<char32_t>(S); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp index d825788506b..32c37e7f7a5 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp @@ -28,4 +28,6 @@ // bool is_relative() const; // tested in path.decompose -int main() {} +int main(int, char**) { + return 0; +} |