aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/callingconv.c
diff options
context:
space:
mode:
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 6c844a373318..266242d4a3a9 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}}