This is an archive of the discontinued LLVM Phabricator instance.

Do not emit exception diagnostics from coroutines and coroutine lambdas
ClosedPublic

Authored by denizevrenci on Feb 19 2023, 10:19 AM.

Details

Summary

Fixes #48797

All exceptions thrown in coroutine bodies are caught and
unhandled_exception member of the coroutine promise type is called.
In accordance with the existing rules of diagnostics related to
exceptions thrown in functions marked noexcept, even if the promise
type's constructor, get_return_object, or unhandled_exception
throws, diagnostics should not be emitted.

Diff Detail

Event Timeline

denizevrenci created this revision.Feb 19 2023, 10:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2023, 10:19 AM
Herald added a subscriber: ChuanqiXu. · View Herald Transcript
denizevrenci requested review of this revision.Feb 19 2023, 10:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2023, 10:19 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Added some throws that should be ignored.

NoQ accepted this revision.Feb 22 2023, 5:20 PM

Makes sense to me!

This revision is now accepted and ready to land.Feb 22 2023, 5:20 PM

@NoQ I don't have commit access. Should I leave landing the diff to you?

Author info for the commit: Deniz Evrenci (denizevrenci@gmail.com)