OSDN Git Service

[Coroutines] Handle dependent promise types for final_suspend non-throw check
authorXun Li <xun@fb.com>
Mon, 22 Jun 2020 21:38:41 +0000 (14:38 -0700)
committerXun Li <xun@fb.com>
Thu, 25 Jun 2020 18:27:27 +0000 (11:27 -0700)
commitc25acec84594ca15748553341969f8e579290e27
tree223721769d0413272f82dbc9948cc8710434c630
parent636d31a5c341ff2ca5eefd6075ff059eb60b5a80
[Coroutines] Handle dependent promise types for final_suspend non-throw check

Summary:
Check that the co_await promise.final_suspend() does not potentially throw again after we have resolved dependent types.
This takes care of the cases where promises types are templated.
Added test cases for this scenario and confirmed that the checks happen now.
Also run libcxx tests locally to make sure all tests pass.

Reviewers: Benabik, lewissbaker, junparser, modocache

Reviewed By: modocache

Subscribers: modocache, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82332
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCoroutine.cpp
clang/lib/Sema/TreeTransform.h
clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp