summaryrefslogtreecommitdiff
path: root/clang/test/Sema/va_arg_x86_64.c
blob: 9f514c1f59e4055197ca7880d784d49c1ef9ed0e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -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 void f (char * (*g) (char **, int), char **p, ...) {
  char *s;
  va_list v;
  s = g (p, __builtin_va_arg(v, int));
}