aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/stdcall-fastcall.c
blob: e0db63822fb3a5b9585c411d85533a052ab11bb4 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: clang-cc -fsyntax-only -verify %s

// CC qualifier can be applied only to functions
int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' attribute only applies to function types}}
int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' attribute only applies to function types}}

// Different CC qualifiers are not compatible
void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}
void __attribute__((stdcall)) foo4();
void __attribute__((fastcall)) foo4(void); // expected-error{{fastcall and stdcall attributes are not compatible}}