2009-12-15 23:14:24 +03:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -triple=x86_64-unknown-freebsd7.0 %s
|
2008-08-10 03:32:40 +04:00
|
|
|
|
2008-08-21 02:17:17 +04:00
|
|
|
// PR2631
|
2008-08-10 03:32:40 +04:00
|
|
|
char* foo(char *fmt, __builtin_va_list ap)
|
|
|
|
{
|
|
|
|
return __builtin_va_arg((ap), char *);
|
|
|
|
}
|
2008-08-21 02:17:17 +04:00
|
|
|
|
|
|
|
// PR2692
|
|
|
|
typedef __builtin_va_list va_list;
|
2009-07-22 04:43:08 +04:00
|
|
|
static void f (char * (*g) (char **, int), char **p, ...) {
|
|
|
|
char *s;
|
|
|
|
va_list v;
|
|
|
|
s = g (p, __builtin_va_arg(v, int));
|
2008-08-21 02:17:17 +04:00
|
|
|
}
|