1 // Test that if the compiler will emit error message if the promise_type contain
2 // operator delete but none of them are available. This is required by the standard.
3 // RUN: %clang_cc1 %s -std=c++20 %s -fsyntax-only -verify
5 #include "Inputs/std-coroutine.h"
8 typedef __SIZE_TYPE__
size_t;
9 enum class align_val_t
: size_t {};
14 auto initial_suspend() { return std::suspend_always
{}; }
15 auto final_suspend() noexcept
{ return std::suspend_always
{}; }
16 auto get_return_object() { return task
{}; }
17 void unhandled_exception() {}
18 void return_value(int) {}
20 void operator delete(void *ptr
, void *meaningless_placeholder
); // expected-note {{member 'operator delete' declared here}}
24 task
f() { // expected-error 1+{{no suitable member 'operator delete' in 'promise_type'}}