Diagnose the use of 'fastcall' on functions without prototypes or with
varargs prototypes.
llvm-svn: 86001
diff --git a/clang/test/Sema/callingconv.c b/clang/test/Sema/callingconv.c
index cb69c59..102115b 100644
--- a/clang/test/Sema/callingconv.c
+++ b/clang/test/Sema/callingconv.c
@@ -8,3 +8,12 @@
void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{attribute requires 0 argument(s)}}
}
+
+void __attribute__((fastcall)) test0() { // expected-error {{function with no prototype cannot use 'fastcall' calling convention}}
+}
+
+void __attribute__((fastcall)) test1(void) {
+}
+
+void __attribute__((fastcall)) test2(int a, ...) { // expected-error {{variadic function cannot use 'fastcall' calling convention}}
+}