| 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 |
| 6 |
|
| 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) {} |
| 13 |
|
| 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) {} |