2014-08-01 01:19:18 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-pc-win32 -verify %s
|
|
|
|
|
|
|
|
// It's important that this is a .c file.
|
|
|
|
|
2014-09-20 07:07:12 +08:00
|
|
|
// This is fine, as CrcGenerateTable*() has a prototype.
|
|
|
|
void __fastcall CrcGenerateTableFastcall(void);
|
|
|
|
void __fastcall CrcGenerateTableFastcall() {}
|
|
|
|
void __stdcall CrcGenerateTableStdcall(void);
|
|
|
|
void __stdcall CrcGenerateTableStdcall() {}
|
|
|
|
void __thiscall CrcGenerateTableThiscall(void);
|
|
|
|
void __thiscall CrcGenerateTableThiscall() {}
|
|
|
|
void __pascal CrcGenerateTablePascal(void);
|
|
|
|
void __pascal CrcGenerateTablePascal() {}
|
2014-10-25 01:42:17 +08:00
|
|
|
void __vectorcall CrcGenerateTableVectorcall(void);
|
|
|
|
void __vectorcall CrcGenerateTableVectorcall() {}
|
2014-08-01 01:19:18 +08:00
|
|
|
|
2014-10-25 01:42:17 +08:00
|
|
|
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}}
|
2014-09-20 07:07:12 +08:00
|
|
|
|
|
|
|
// Regular calling convention is fine.
|
|
|
|
void CrcGenerateTableNoProto() {}
|