[OpenACC] Enable 'attach' clause for combined constructs
[llvm-project.git] / clang / test / CodeGenCoroutines / microsoft-abi-operator-coawait.cpp
blob6abb5334bcc9b32c004ef21869eea2b400af17c5
1 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc18.0.0 -emit-llvm %s -o - -std=c++20 -disable-llvm-passes | FileCheck %s
2 struct no_suspend {
3 bool await_ready() { return true; }
4 template <typename F> void await_suspend(F) {}
5 void await_resume() {}
6 };
8 struct A {
9 no_suspend operator co_await() { return {}; }
12 struct B {};
14 no_suspend operator co_await(B const&) { return {}; }
16 // CHECK-LABEL: f(
17 extern "C" void f() {
18 A a;
19 B b;
20 // CHECK: call void @"??__LA@@QEAA?AUno_suspend@@XZ"(
21 a.operator co_await();
22 // CHECK-NEXT: call i8 @"??__L@YA?AUno_suspend@@AEBUB@@@Z"(
23 operator co_await(b);