]> granicus.if.org Git - clang/commit
[coroutines] Implement unhandled_exception changes.
authorEric Fiselier <eric@efcs.ca>
Thu, 23 Mar 2017 00:33:33 +0000 (00:33 +0000)
committerEric Fiselier <eric@efcs.ca>
Thu, 23 Mar 2017 00:33:33 +0000 (00:33 +0000)
commitbc27c2f122398298615b9d995f222a24a44cd648
tree73578acf0e69aa569034ef382ba2732b2e3dabc9
parentd8f2619ff21a2596f3bf4e79633d85b4fca9280d
[coroutines] Implement unhandled_exception changes.

Summary:
This patch adopts the recent changes that renamed `set_exception(exception_pointer)` to `unhandled_exception()`.

Additionally `unhandled_exception()` is now required, and so an error is emitted when exceptions are enabled but the promise type does not provide the member.
When exceptions are disabled a warning is emitted instead of an error, The warning notes that the `unhandled_exception()` function is required when exceptions are enabled.

Reviewers: rsmith, GorNishanov, aaron.ballman, majnemer

Reviewed By: GorNishanov

Subscribers: mehdi_amini, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298565 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaCoroutine.cpp
test/SemaCXX/Inputs/std-coroutine.h [new file with mode: 0644]
test/SemaCXX/coreturn.cpp
test/SemaCXX/coroutine-unhandled_exception-warning.cpp [new file with mode: 0644]
test/SemaCXX/coroutines.cpp