Author: ericwf Date: Sun Jul 22 13:50:16 2018 New Revision: 337658 URL: http://llvm.org/viewvc/llvm-project?rev=337658&view=rev Log: fix test failures with older clang versions
Added: libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.cons/default_const.pass.cpp Modified: libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_size.pass.cpp libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp Added: libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.cons/default_const.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.cons/default_const.pass.cpp?rev=337658&view=auto ============================================================================== --- libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.cons/default_const.pass.cpp (added) +++ libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.cons/default_const.pass.cpp Sun Jul 22 13:50:16 2018 @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 +// XFAIL: apple-clang-7, clang-3.7, clang-3.8 + +// <experimental/filesystem> + +// class directory_entry + +// directory_entry() noexcept = default; + +#include "filesystem_include.hpp" +#include <type_traits> +#include <cassert> + +int main() { + using namespace fs; + // Default + { + static_assert(std::is_nothrow_default_constructible<directory_entry>::value, + "directory_entry must have a nothrow default constructor"); + const directory_entry e; + assert(e.path() == path()); + } +} Modified: libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_size.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_size.pass.cpp?rev=337658&r1=337657&r2=337658&view=diff ============================================================================== --- libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_size.pass.cpp (original) +++ libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_size.pass.cpp Sun Jul 22 13:50:16 2018 @@ -30,7 +30,7 @@ TEST_SUITE(directory_entry_obs_testsuite TEST_CASE(signatures) { using namespace fs; { - const fs::directory_entry e; + const fs::directory_entry e = {}; std::error_code ec; static_assert(std::is_same<decltype(e.file_size()), uintmax_t>::value, ""); static_assert(std::is_same<decltype(e.file_size(ec)), uintmax_t>::value, Modified: libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp?rev=337658&r1=337657&r2=337658&view=diff ============================================================================== --- libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp (original) +++ libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp Sun Jul 22 13:50:16 2018 @@ -32,7 +32,7 @@ TEST_CASE(file_dne) { TEST_CASE(signatures) { using namespace fs; - const directory_entry e; + const directory_entry e = {}; std::error_code ec; #define TEST_FUNC(name) \ static_assert(std::is_same<decltype(e.name()), bool>::value, \ Modified: libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp?rev=337658&r1=337657&r2=337658&view=diff ============================================================================== --- libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp (original) +++ libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp Sun Jul 22 13:50:16 2018 @@ -28,7 +28,7 @@ TEST_SUITE(directory_entry_obs_testsuite TEST_CASE(signatures) { using namespace fs; { - const fs::directory_entry e; + const directory_entry e = {}; std::error_code ec; static_assert(std::is_same<decltype(e.hard_link_count()), uintmax_t>::value, ""); static_assert(std::is_same<decltype(e.hard_link_count(ec)), uintmax_t>::value, Modified: libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp?rev=337658&r1=337657&r2=337658&view=diff ============================================================================== --- libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp (original) +++ libcxx/trunk/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp Sun Jul 22 13:50:16 2018 @@ -28,7 +28,7 @@ TEST_SUITE(directory_entry_obs_testsuite TEST_CASE(signatures) { using namespace fs; { - const fs::directory_entry e; + const fs::directory_entry e = {}; std::error_code ec; static_assert(std::is_same<decltype(e.last_write_time()), file_time_type>::value, ""); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits