[all-commits] [llvm/llvm-project] f33249: [Clang] Do not emit exception diagnostics from cor...

Deniz Evrenci via All-commits all-commits at lists.llvm.org
Tue Feb 28 02:41:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f332498f9880d276890562fb861a375a13bfd9d9
      https://github.com/llvm/llvm-project/commit/f332498f9880d276890562fb861a375a13bfd9d9
  Author: Deniz Evrenci <denizevrenci at gmail.com>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M clang/lib/Sema/AnalysisBasedWarnings.cpp
    A clang/test/SemaCXX/warn-throw-out-noexcept-coro.cpp

  Log Message:
  -----------
  [Clang] Do not emit exception diagnostics from coroutines and coroutine lambdas

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 #48797.

Differential Revision: https://reviews.llvm.org/D144352




More information about the All-commits mailing list