[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)
commita9fdb346dbc6bb73238f1be4ce2e99f790ab49f6
tree13a1012278c761dfee4d493731ddb8df0461bfc9
parentc573acd9e96b850cee9d9cf148e8831f004fbe62
[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

llvm-svn: 298565
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaCoroutine.cpp
clang/test/SemaCXX/Inputs/std-coroutine.h [new file with mode: 0644]
clang/test/SemaCXX/coreturn.cpp
clang/test/SemaCXX/coroutine-unhandled_exception-warning.cpp [new file with mode: 0644]
clang/test/SemaCXX/coroutines.cpp