testsuite, coroutines : Mark final awaiters and co_await operators noexcept.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 28 Feb 2021 01:13:50 +0000 (01:13 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 28 Feb 2021 16:28:12 +0000 (16:28 +0000)
commit3c173f7890cfd6649b687adc5b0598d9e01fcd6d
tree8a8c7c19826206fd788ef54e6502451d8f71ab3f
parent7e5d7fc7e6f99b7332284e2fd07502f4a049acc1
testsuite, coroutines : Mark final awaiters and co_await operators noexcept.

This is part of the requirement of [dcl.fct.def.coroutine]/15.

In addition to promise final_suspend() calls, the following cases must
also be noexcept as per discussion in PR95616.

- finalSuspendObj.operator co_await()
- finalSuspendAwaiter.await_ready()
- finalSuspendAwaiter.await_suspend()
- finalSuspendAwaiter.await_resume()
- finalSuspedObj destructor
- finalSuspendAwaiter destructor

Fixed for missing cases in the testsuite as a prerequisite to fixing
PR95616.

gcc/testsuite/ChangeLog:

* g++.dg/coroutines/pr94879-folly-1.C: Make final suspend
expression components noexcept.
* g++.dg/coroutines/pr94883-folly-2.C: Likewise.
* g++.dg/coroutines/pr95345.C: Likewise.
gcc/testsuite/g++.dg/coroutines/pr94879-folly-1.C
gcc/testsuite/g++.dg/coroutines/pr94883-folly-2.C
gcc/testsuite/g++.dg/coroutines/pr95345.C