summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/callingconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/callingconv.c')
-rw-r--r--clang/test/Sema/callingconv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/callingconv.c b/clang/test/Sema/callingconv.c
index 5badc14a01f..732c6add6ea 100644
--- a/clang/test/Sema/callingconv.c
+++ b/clang/test/Sema/callingconv.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 %s -fsyntax-only -triple i386-unknown-unknown -verify
+// RUN: %clang_cc1 %s -fsyntax-only -triple i386-unknown-unknown -fms-compatibility -DWIN -verify
void __attribute__((fastcall)) foo(float *a) {
}
@@ -15,8 +16,13 @@ void __attribute__((fastcall)) test0() { // expected-error {{function with no pr
void __attribute__((fastcall)) test1(void) {
}
+#ifdef WIN
+void __attribute__((fastcall)) test2(int a, ...) { // expected-warning {{fastcall calling convention ignored on variadic function}}
+}
+#else
void __attribute__((fastcall)) test2(int a, ...) { // expected-error {{variadic function cannot use fastcall calling convention}}
}
+#endif
void __attribute__((cdecl)) ctest0() {}
OpenPOWER on IntegriCloud