From e2ddd515abd1735a3a8c075f2e6e487872cb8a4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Mon, 19 Oct 2020 11:46:58 +0300 Subject: [PATCH] [libcxx] [test] Allow fs::permissions(path, perms, perm_options, error_code) to be noexcept The standard doesn't declare this overload as noexcept, but doesn't either say that it strictly cannot be noexcept either. The function doesn't throw on errors that are signaled via error_code, but the standard says that it may throw a bad_alloc. This fixes an error with libstdc++ on linux. Differential Revision: https://reviews.llvm.org/D89678 --- .../filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp index 74406dc..fe4ddee 100644 --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp @@ -38,7 +38,7 @@ TEST_CASE(test_signatures) ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr)); ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr, opts)); ASSERT_NOEXCEPT(fs::permissions(p, pr, ec)); - ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr, opts, ec)); + LIBCPP_ONLY(ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr, opts, ec))); } TEST_CASE(test_error_reporting) -- 2.7.4