[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / swift-call-conv.c
blob2c9be8405584813d3054e9984d71c3d3bc21f390
1 // RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -fsyntax-only %s -verify
2 // RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -fsyntax-only %s -verify
3 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fsyntax-only %s -verify
4 // RISC-V does not support swiftcall
5 // RUN: %clang_cc1 -triple riscv32-unknown-elf -fsyntax-only %s -verify
7 #if __has_extension(swiftcc)
8 // expected-no-diagnostics
9 #else
10 // expected-warning@+2 {{'__swiftcall__' calling convention is not supported for this target}}
11 #endif
12 void __attribute__((__swiftcall__)) f(void) {}
14 #if __has_extension(swiftasynccc)
15 // expected-no-diagnostics
16 #else
17 // expected-warning@+2 {{'__swiftasynccall__' calling convention is not supported for this target}}
18 #endif
19 void __attribute__((__swiftasynccall__)) g(void) {}