2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2008-12-26 08:51:21 +08:00
|
|
|
|
|
|
|
// CC qualifier can be applied only to functions
|
2010-02-06 05:31:56 +08:00
|
|
|
int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' only applies to function types; type here is 'int'}}
|
|
|
|
int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' only applies to function types; type here is 'int'}}
|
2008-12-26 08:51:21 +08:00
|
|
|
|
|
|
|
// Different CC qualifiers are not compatible
|
2009-11-04 11:36:09 +08:00
|
|
|
void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}
|
2010-02-06 05:31:56 +08:00
|
|
|
void __attribute__((stdcall)) foo4(); // expected-note{{previous declaration is here}}
|
|
|
|
void __attribute__((fastcall)) foo4(void); // expected-error{{function declared 'fastcall' here was previously declared 'stdcall'}}
|