phunix/external/bsd/llvm/dist/clang/test/Sema/decl-microsoft-call-conv.c
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

36 lines
1.9 KiB
C

// RUN: %clang_cc1 -triple i686-pc-win32 -verify %s
// It's important that this is a .c file.
// This is fine, as CrcGenerateTable*() has a prototype.
void __fastcall CrcGenerateTableFastcall(void);
void __fastcall CrcGenerateTableFastcall();
void __fastcall CrcGenerateTableFastcall() {}
void __stdcall CrcGenerateTableStdcall(void);
void __stdcall CrcGenerateTableStdcall();
void __stdcall CrcGenerateTableStdcall() {}
void __thiscall CrcGenerateTableThiscall(void);
void __thiscall CrcGenerateTableThiscall();
void __thiscall CrcGenerateTableThiscall() {}
void __pascal CrcGenerateTablePascal(void);
void __pascal CrcGenerateTablePascal();
void __pascal CrcGenerateTablePascal() {}
void __vectorcall CrcGenerateTableVectorcall(void);
void __vectorcall CrcGenerateTableVectorcall();
void __vectorcall CrcGenerateTableVectorcall() {}
void __fastcall CrcGenerateTableNoProtoFastcall(); // expected-error{{function with no prototype cannot use the fastcall calling convention}}
void __stdcall CrcGenerateTableNoProtoStdcall(); // expected-warning{{function with no prototype cannot use the stdcall calling convention}}
void __thiscall CrcGenerateTableNoProtoThiscall(); // expected-error{{function with no prototype cannot use the thiscall calling convention}}
void __pascal CrcGenerateTableNoProtoPascal(); // expected-error{{function with no prototype cannot use the pascal calling convention}}
void __vectorcall CrcGenerateTableNoProtoVectorcall(); // expected-error{{function with no prototype cannot use the vectorcall calling convention}}
void __fastcall CrcGenerateTableNoProtoDefFastcall() {}
void __stdcall CrcGenerateTableNoProtoDefStdcall() {}
void __thiscall CrcGenerateTableNoProtoDefThiscall() {}
void __pascal CrcGenerateTableNoProtoDefPascal() {}
void __vectorcall CrcGenerateTableNoProtoDefVectorcall() {}
// Regular calling convention is fine.
void CrcGenerateTableNoProto() {}