[all-commits] [llvm/llvm-project] 4f4340: [NFC] [Coroutines] Refactor implementation in chec...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Thu Jan 13 23:37:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f4340ee2af36909db77aeedb1d22c2ba52d2dfa
      https://github.com/llvm/llvm-project/commit/4f4340ee2af36909db77aeedb1d22c2ba52d2dfa
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2022-01-14 (Fri, 14 Jan 2022)

  Changed paths:
    M clang/lib/Sema/SemaCoroutine.cpp
    M clang/test/SemaCXX/coroutine-final-suspend-noexcept-exp-namespace.cpp
    M clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp

  Log Message:
  -----------
  [NFC] [Coroutines] Refactor implementation in checkFinalSuspendNoThrow

Now when we are checking if the expression `co_await
promise.final_suspend()` is not throw, we would check unconditionally
for its child expressions recursively. It takes unnecessary time. And
the compiler would complains if the implementation in final_suspend()
may throw even if the higher level function signature marked noexcept
already.

This fixes bug48453 too.




More information about the All-commits mailing list