llvm-project/clang/test/Sema/callingconv-ms_abi.c
Prabhu Rajasekaran 20d6375796
[clang] Handle CC attrs for UEFI (#138935)
UEFI's default ABI is MS ABI. Handle the calling convention attributes
accordingly.
2025-05-07 21:42:01 -07:00

11 lines
436 B
C

// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-pc-win32 %s
// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-uefi %s
void __attribute__((ms_abi)) foo(void);
void (*pfoo)(void) = foo;
void __attribute__((sysv_abi)) bar(void);
void (*pbar)(void) = bar; // expected-error{{incompatible function pointer types}}
void (__attribute__((sysv_abi)) *pfoo2)(void) = foo; // expected-error{{incompatible function pointer types}}