[libcxx-commits] [PATCH] D89678: [libcxx] [test] Allow fs::permissions(path, perms, perm_options, error_code) to be noexcept
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 19 02:49:04 PDT 2020
mstorsjo created this revision.
mstorsjo added a reviewer: libc++.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
mstorsjo requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89678
Files:
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
Index: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
@@ -38,7 +38,7 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89678.298973.patch
Type: text/x-patch
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201019/aa73e6a3/attachment.bin>
More information about the libcxx-commits
mailing list