diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-03-23 00:33:33 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-03-23 00:33:33 +0000 |
commit | bc27c2f122398298615b9d995f222a24a44cd648 (patch) | |
tree | 73578acf0e69aa569034ef382ba2732b2e3dabc9 /include/clang/Basic/DiagnosticSemaKinds.td | |
parent | d8f2619ff21a2596f3bf4e79633d85b4fca9280d (diff) |
[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
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index fe40cb002d..afd8f57392 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -8865,11 +8865,6 @@ def err_coroutine_promise_type_incomplete : Error< def err_coroutine_type_missing_specialization : Error< "this function cannot be a coroutine: missing definition of " "specialization %q0">; -def err_implied_std_current_exception_not_found : Error< - "you need to include <exception> before defining a coroutine that implicitly " - "uses 'set_exception'">; -def err_malformed_std_current_exception : Error< - "'std::current_exception' must be a function">; def err_coroutine_promise_return_ill_formed : Error< "%0 declares both 'return_value' and 'return_void'">; def note_coroutine_promise_implicit_await_transform_required_here : Note< @@ -8877,6 +8872,11 @@ def note_coroutine_promise_implicit_await_transform_required_here : Note< def note_coroutine_promise_call_implicitly_required : Note< "call to '%select{initial_suspend|final_suspend}0' implicitly " "required by the %select{initial suspend point|final suspend point}0">; +def err_coroutine_promise_unhandled_exception_required : Error< + "%0 is required to declare the member 'unhandled_exception()'">; +def warn_coroutine_promise_unhandled_exception_required_with_exceptions : Warning< + "%0 is required to declare the member 'unhandled_exception()' when exceptions are enabled">, + InGroup<Coroutine>; } let CategoryName = "Documentation Issue" in { |