[llvm-bugs] [Bug 49109] New: clang incorrectly requires coroutine_handle::from_address to be noexcept
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 9 02:40:29 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49109
Bug ID: 49109
Summary: clang incorrectly requires
coroutine_handle::from_address to be noexcept
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: redbeard0531 at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
from_address() is not required to be noexcept:
https://eel.is/c++draft/coroutine.handle
However clang will error with a line pointing to (the end of)
coroutine_handle<_Promise>::from_address(), presumably because it is checking
for noexcept as per https://eel.is/c++draft/dcl.fct.def.coroutine#15 after
generating that call as part of its internal lowering. This feels like a
leaking of an implementation detail. In practice, it causes issues when trying
to use libstdc++'s <coroutine> because it doesn't mark that method as noexcept.
I've filed a bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99021) with them
asking to change it, but it would be nice if clang didn't require the noexcept,
both because it isn't required by the standard, and because it will make it
easier to use clang with the already-in-the-wild libstdc++-10 installs.
src/mongo/db/index/columns_index_access_method.cpp:328:28: error: the
expression 'co_await __promise.final_suspend()' is required to be non-throwing
generator<BSONElement> subcellElements() const {
^
/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/coroutine:205:5:
note: must be declared with 'noexcept'
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210209/57ba8854/attachment.html>
More information about the llvm-bugs
mailing list