1 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++14 -fcoroutines-ts -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -verify -fblocks -Wno-unreachable-code -Wno-unused-value
2 
3 #if __has_feature(cxx_exceptions)
4 #error This test requires exceptions be disabled
5 #endif
6 
7 #include "Inputs/std-coroutine.h"
8 
9 using std::experimental::suspend_always;
10 using std::experimental::suspend_never;
11 
12 struct promise_void {
13   void get_return_object();
14   suspend_always initial_suspend();
15   suspend_always final_suspend();
16   void return_void();
17 };
18 
19 template <typename... T>
20 struct std::experimental::coroutine_traits<void, T...> { using promise_type = promise_void; };
21 
22 void test0() { // expected-warning {{'promise_void' is required to declare the member 'unhandled_exception()' when exceptions are enabled}}
23   co_return;
24 }
25