[PATCH] D147417: [clang-tidy] Do not emit bugprone-exception-escape warnings from coroutines

Deniz Evrenci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 2 14:01:36 PDT 2023


denizevrenci created this revision.
denizevrenci added a reviewer: njames93.
Herald added subscribers: PiotrZSL, carlosgalvezp, ChuanqiXu, xazax.hun.
Herald added a project: All.
denizevrenci requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

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.

Fixes #61905.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147417

Files:
  clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147417.510368.patch
Type: text/x-patch
Size: 4599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230402/1925b2f2/attachment.bin>


More information about the cfe-commits mailing list