Debian Codegraph @

clang/test/CIR/IR/invalid-await.cir

raw
1 // RUN: cir-opt %s -verify-diagnostics -split-input-file
2 cir.func coroutine @bad_task() { // expected-error {{coroutine body must use at least one cir.await op}}
3 cir.return
4 }
5
6 // -----
7
8 cir.func coroutine @missing_condition() {
9 cir.scope {
10 cir.await(user, ready : { // expected-error {{ready region must end with cir.condition}}
11 cir.yield
12 }, suspend : {
13 cir.yield
14 }, resume : {
15 cir.yield
16 },)
17 }
18 cir.return
19 }