Anton Korobeynikov | ba42c1c | 2008-12-26 00:51:21 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | // CC qualifier can be applied only to functions |
| 4 | int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' attribute only applies to function types}} |
| 5 | int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' attribute only applies to function types}} |
| 6 | |
| 7 | // Different CC qualifiers are not compatible |
| 8 | void __attribute__((stdcall, fastcall)) foo3(); // expected-error{{stdcall and fastcall attributes are not compatible}} |
| 9 | |
| 10 | // FIXME: Something went wrong recently and diagnostics is not generated anymore |
| 11 | void __attribute__((stdcall)) foo4(); |
| 12 | void __attribute__((fastcall)) foo4(); |