mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 03:56:06 +00:00

MSVC doesn't warn on this. Users are expected to apply the WINAPI macro to functions passed by pointer to the Win32 API, and this macro expands to __stdcall. This means we end up with a lot of useless noisy warnings about ignored calling conventions when compiling code with clang for Win64. llvm-svn: 230668
14 lines
350 B
C
14 lines
350 B
C
// RUN: %clang_cc1 %s -Wmicrosoft -verify -fms-compatibility -triple x86_64-pc-win32
|
|
|
|
// None of these should warn. stdcall is treated as equivalent to cdecl on
|
|
// x64.
|
|
// expected-no-diagnostics
|
|
|
|
int __stdcall f(void);
|
|
int __cdecl f(void) {
|
|
return 0;
|
|
}
|
|
int __stdcall func_std(void);
|
|
int __thiscall func_this(void);
|
|
int __fastcall func_fast(void);
|