Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / coroutine-no-move-ctor.cpp
blob824dea375ebdef6d323c1c736a41bcb9c2eb3e50
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only -verify
2 // expected-no-diagnostics
4 #include "Inputs/std-coroutine.h"
6 class invoker {
7 public:
8 class invoker_promise {
9 public:
10 invoker get_return_object() { return invoker{}; }
11 auto initial_suspend() { return std::suspend_never{}; }
12 auto final_suspend() noexcept { return std::suspend_never{}; }
13 void return_void() {}
14 void unhandled_exception() {}
16 using promise_type = invoker_promise;
17 invoker() {}
18 invoker(const invoker &) = delete;
19 invoker &operator=(const invoker &) = delete;
20 invoker(invoker &&) = delete;
21 invoker &operator=(invoker &&) = delete;
24 invoker f() {
25 co_return;