2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -triple=x86_64-unknown-freebsd7.0 %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2008-08-10 07:32:40 +08:00
|
|
|
|
2008-08-21 06:17:17 +08:00
|
|
|
// PR2631
|
2008-08-10 07:32:40 +08:00
|
|
|
char* foo(char *fmt, __builtin_va_list ap)
|
|
|
|
{
|
|
|
|
return __builtin_va_arg((ap), char *);
|
|
|
|
}
|
2008-08-21 06:17:17 +08:00
|
|
|
|
|
|
|
// PR2692
|
|
|
|
typedef __builtin_va_list va_list;
|
2009-07-22 08:43:08 +08: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 06:17:17 +08:00
|
|
|
}
|