20 lines · c
1// RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -fsyntax-only %s -verify2// RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -fsyntax-only %s -verify3// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fsyntax-only %s -verify4// RISC-V does not support swiftcall5// RUN: %clang_cc1 -triple riscv32-unknown-elf -fsyntax-only %s -verify6 7#if __has_extension(swiftcc)8// expected-no-diagnostics9#else10// expected-warning@+2 {{'__swiftcall__' calling convention is not supported for this target}}11#endif12void __attribute__((__swiftcall__)) f(void) {}13 14#if __has_extension(swiftasynccc)15// expected-no-diagnostics16#else17// expected-warning@+2 {{'__swiftasynccall__' calling convention is not supported for this target}}18#endif19void __attribute__((__swiftasynccall__)) g(void) {}20