summaryrefslogtreecommitdiffstats
path: root/test/Sema/stdcall-fastcall.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
committered <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
commitf27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch)
treece7d964cbb5e39695b71481698f10cb099c23d4a /test/Sema/stdcall-fastcall.c
downloadFreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip
FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz
Import Clang, at r72732.
Diffstat (limited to 'test/Sema/stdcall-fastcall.c')
-rw-r--r--test/Sema/stdcall-fastcall.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Sema/stdcall-fastcall.c b/test/Sema/stdcall-fastcall.c
new file mode 100644
index 0000000..353bbfc
--- /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}}
OpenPOWER on IntegriCloud