blob: 102115b3bf2ba111b79bcb50e1ee173b4727df47 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc %s -fsyntax-only -verify
Nate Begemanb6789ca2008-03-07 20:04:49 +00002
3void __attribute__((fastcall)) foo(float *a) {
4}
5
6void __attribute__((stdcall)) bar(float *a) {
7}
8
9void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{attribute requires 0 argument(s)}}
10}
John McCall9112b932009-11-04 03:36:09 +000011
12void __attribute__((fastcall)) test0() { // expected-error {{function with no prototype cannot use 'fastcall' calling convention}}
13}
14
15void __attribute__((fastcall)) test1(void) {
16}
17
18void __attribute__((fastcall)) test2(int a, ...) { // expected-error {{variadic function cannot use 'fastcall' calling convention}}
19}