summaryrefslogtreecommitdiffstats
path: root/test/Sema/callingconv.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
committerdim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
commit056abd2059c65a3e908193aeae16fad98017437c (patch)
tree2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/Sema/callingconv.c
parentcc73504950eb7b5dff2dded9bedd67bc36d64641 (diff)
downloadFreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip
FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'test/Sema/callingconv.c')
-rw-r--r--test/Sema/callingconv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Sema/callingconv.c b/test/Sema/callingconv.c
index 6c844a3..266242d 100644
--- a/test/Sema/callingconv.c
+++ b/test/Sema/callingconv.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify
+// RUN: %clang_cc1 %s -fsyntax-only -triple i386-unknown-unknown -verify
void __attribute__((fastcall)) foo(float *a) {
}
@@ -40,8 +40,9 @@ int __attribute__((pcs("aapcs", "aapcs"))) pcs1(void); // expected-error {{attri
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
+/* These are ignored because the target is i386 and not ARM */
+int __attribute__((pcs("aapcs"))) pcs5(void); // expected-warning {{calling convention 'pcs' ignored for this target}}
+int __attribute__((pcs("aapcs-vfp"))) pcs6(void); // expected-warning {{calling convention 'pcs' ignored for this target}}
int __attribute__((pcs("foo"))) pcs7(void); // expected-error {{Invalid PCS type}}
// PR6361
@@ -52,3 +53,4 @@ void __attribute__((cdecl)) ctest3() {}
typedef __attribute__((stdcall)) void (*PROC)();
PROC __attribute__((cdecl)) ctest4(const char *x) {}
+void __attribute__((pnaclcall)) pnaclfunc(float *a) {} // expected-warning {{calling convention 'pnaclcall' ignored for this target}}
OpenPOWER on IntegriCloud