[all-commits] [llvm/llvm-project] 366159: [Coroutines] Special handle __builtin_coro_resume ...

Xun Li via All-commits all-commits at lists.llvm.org
Thu Jun 25 10:50:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 366159566df3a980d3e34f3ec9609e77cdb4df8b
      https://github.com/llvm/llvm-project/commit/366159566df3a980d3e34f3ec9609e77cdb4df8b
  Author: Xun Li <xun at fb.com>
  Date:   2020-06-25 (Thu, 25 Jun 2020)

  Changed paths:
    M clang/lib/Sema/SemaCoroutine.cpp

  Log Message:
  -----------
  [Coroutines] Special handle __builtin_coro_resume for final_suspend nothrow check

Summary:
In https://reviews.llvm.org/D82029 we added the conformance check that the expression co_await promise.final_suspend() should not potentially throw.
As part of this expression, in cases when the await_suspend() method of the final suspend awaiter returns a handle, __builtin_coro_resume could be called on the handle to immediately resume that coroutine.
__builtin_coro_resume is not declared with noexcept and it shouldn't. We need to special check this case here.

Reviewers: modocache, lewissbaker, junparser

Reviewed By: lewissbaker

Subscribers: modocache, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list