summaryrefslogtreecommitdiffstats
path: root/test/Sema/callingconv.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-19 10:33:04 +0000
committerdim <dim@FreeBSD.org>2012-08-19 10:33:04 +0000
commitcc73504950eb7b5dff2dded9bedd67bc36d64641 (patch)
tree5b9c2fa9d79942fbdce3d618e37e27c18263af9a /test/Sema/callingconv.c
parent554bcb69c2d785a011a30e7db87a36a87fe7db10 (diff)
downloadFreeBSD-src-cc73504950eb7b5dff2dded9bedd67bc36d64641.zip
FreeBSD-src-cc73504950eb7b5dff2dded9bedd67bc36d64641.tar.gz
Vendor import of clang trunk r162107:
http://llvm.org/svn/llvm-project/cfe/trunk@162107
Diffstat (limited to 'test/Sema/callingconv.c')
-rw-r--r--test/Sema/callingconv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/callingconv.c b/test/Sema/callingconv.c
index 25669f0..6c844a3 100644
--- a/test/Sema/callingconv.c
+++ b/test/Sema/callingconv.c
@@ -36,6 +36,14 @@ void (__attribute__((cdecl)) *pctest2)() = ctest2;
typedef void (__attribute__((fastcall)) *Handler) (float *);
Handler H = foo;
+int __attribute__((pcs("aapcs", "aapcs"))) pcs1(void); // expected-error {{attribute takes one argument}}
+int __attribute__((pcs())) pcs2(void); // expected-error {{attribute takes one argument}}
+int __attribute__((pcs(pcs1))) pcs3(void); // expected-error {{attribute takes one argument}}
+int __attribute__((pcs(0))) pcs4(void); // expected-error {{'pcs' attribute requires parameter 1 to be a string}}
+int __attribute__((pcs("aapcs"))) pcs5(void); // no-error
+int __attribute__((pcs("aapcs-vfp"))) pcs6(void); // no-error
+int __attribute__((pcs("foo"))) pcs7(void); // expected-error {{Invalid PCS type}}
+
// PR6361
void ctest3();
void __attribute__((cdecl)) ctest3() {}
OpenPOWER on IntegriCloud