1 // Tests that the behavior will be good if there are multiple operator delete in the promise_type.
2 // RUN: %clang_cc1 %s -std=c++20 %s -fsyntax-only -verify
3 // expected-no-diagnostics
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
);
21 void operator delete(void *ptr
);
29 // From https://github.com/llvm/llvm-project/issues/60545
32 generator
get_return_object();
33 std::suspend_always
initial_suspend();
34 std::suspend_always
final_suspend() noexcept
;
36 [[noreturn
]] void unhandled_exception();
38 static void* operator new(std::size_t size
);
39 static void operator delete(void* ptr
, const std::size_t size
);
43 generator
goo() { co_return
; }