return PromiseType;
}
-/// Look up the std::coroutine_traits<...>::promise_type for the given
-/// function type.
+/// Look up the std::experimental::coroutine_handle<PromiseType>.
static QualType lookupCoroutineHandleType(Sema &S, QualType PromiseType,
SourceLocation Loc) {
if (PromiseType.isNull())
}
if (isa<CoroutineBodyStmt>(Body)) {
- // FIXME(EricWF): Nothing todo. the body is already a transformed coroutine
- // body statement.
+ // Nothing todo. the body is already a transformed coroutine body statement.
return;
}
: diag::
warn_coroutine_promise_unhandled_exception_required_with_exceptions;
S.Diag(Loc, DiagID) << PromiseRecordDecl;
+ S.Diag(PromiseRecordDecl->getLocation(), diag::note_defined_here)
+ << PromiseRecordDecl;
return !RequireUnhandledException;
}
using std::experimental::suspend_always;
using std::experimental::suspend_never;
+#ifndef DISABLE_WARNING
+struct promise_void { // expected-note {{defined here}}
+#else
struct promise_void {
+#endif
void get_return_object();
suspend_always initial_suspend();
suspend_always final_suspend();
}
template coro<bad_promise_6> bad_implicit_return_dependent(bad_promise_6); // expected-note {{in instantiation}}
-struct bad_promise_7 {
+struct bad_promise_7 { // expected-note 2 {{defined here}}
coro<bad_promise_7> get_return_object();
suspend_always initial_suspend();
suspend_always final_suspend();