[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCoroutines / microsoft-abi-operator-coawait-exp-namespace.cpp
blob33818c5d2fd3ae05cf45fd74cc39183dd25adbd1
1 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc18.0.0 -fcoroutines-ts -emit-llvm %s -o - -std=c++14 -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);