We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no way to use [[clang::musttail]] in any noexcept function.
[[clang::musttail]]
noexcept
int call(int) noexcept; int musttail(int x) noexcept { [[clang::musttail]] return call(x); }
https://godbolt.org/z/s9vYzPbqr
<source>:5:32: error: cannot compile this tail call skipping over cleanups yet [[clang::musttail]] return call(x); ^~~~~~~
It would be nice if clang could handle this basic case where the callee is also noexcept and the exception cleanup section is not actually needed.
The text was updated successfully, but these errors were encountered:
That error comes from here:
llvm-project/clang/lib/CodeGen/CGCall.cpp
Line 5368 in 1b1c8d8
It seems that there must be something on the cleanup stack that either isn't an EHCleanupScope or for which isRedundantBeforeReturn() returns false.
EHCleanupScope
isRedundantBeforeReturn()
Unfortunately I don't know an easy way to dump the cleanup stack in Godbolt.
Sorry, something went wrong.
No branches or pull requests
There is no way to use
[[clang::musttail]]
in anynoexcept
function.https://godbolt.org/z/s9vYzPbqr
It would be nice if clang could handle this basic case where the callee is also
noexcept
and the exception cleanup section is not actually needed.The text was updated successfully, but these errors were encountered: