From ec2b103c267a06a66e926f62cd96767b280f5cf5 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 2 Jun 2009 17:58:47 +0000 Subject: Import Clang, at r72732. --- test/Sema/stdcall-fastcall.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/Sema/stdcall-fastcall.c (limited to 'test/Sema/stdcall-fastcall.c') diff --git a/test/Sema/stdcall-fastcall.c b/test/Sema/stdcall-fastcall.c new file mode 100644 index 000000000000..353bbfc25297 --- /dev/null +++ b/test/Sema/stdcall-fastcall.c @@ -0,0 +1,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(); // expected-error{{stdcall and fastcall attributes are not compatible}} +void __attribute__((stdcall)) foo4(); +void __attribute__((fastcall)) foo4(); // expected-error{{fastcall and stdcall attributes are not compatible}} -- cgit v1.2.3