blob: e0db63822fb3a5b9585c411d85533a052ab11bb4 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Anton Korobeynikov7f7bb722008-12-26 00:51:21 +00002
3// CC qualifier can be applied only to functions
4int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' attribute only applies to function types}}
5int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' attribute only applies to function types}}
6
7// Different CC qualifiers are not compatible
John McCall9112b932009-11-04 03:36:09 +00008void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}
Anton Korobeynikov7f7bb722008-12-26 00:51:21 +00009void __attribute__((stdcall)) foo4();
John McCall9112b932009-11-04 03:36:09 +000010void __attribute__((fastcall)) foo4(void); // expected-error{{fastcall and stdcall attributes are not compatible}}