aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/va_arg_x86_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/va_arg_x86_64.c')
-rw-r--r--test/Sema/va_arg_x86_64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Sema/va_arg_x86_64.c b/test/Sema/va_arg_x86_64.c
new file mode 100644
index 000000000000..680abb714b91
--- /dev/null
+++ b/test/Sema/va_arg_x86_64.c
@@ -0,0 +1,16 @@
+// RUN: clang-cc -fsyntax-only -verify -triple=x86_64-unknown-freebsd7.0 %s
+
+// PR2631
+char* foo(char *fmt, __builtin_va_list ap)
+{
+ return __builtin_va_arg((ap), char *);
+}
+
+// PR2692
+typedef __builtin_va_list va_list;
+static char *f (char * (*g) (char **, int), char **p, ...) {
+ char *s;
+ va_list v;
+ s = g (p, __builtin_va_arg(v, int));
+}
+