2010-10-05 22:55:45 +08:00
|
|
|
// Test this without pch.
|
|
|
|
// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include %S/Inputs/va_arg.h %s -emit-llvm -o -
|
2015-07-08 09:00:30 +08:00
|
|
|
// REQUIRES: x86-registered-target
|
2010-10-05 22:55:45 +08:00
|
|
|
|
|
|
|
// Test with pch.
|
|
|
|
// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -emit-pch -x c++-header -o %t %S/Inputs/va_arg.h
|
|
|
|
// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o -
|
|
|
|
|
|
|
|
typedef __SIZE_TYPE__ size_t;
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
int vsnprintf(char * , size_t, const char * , va_list) ;
|
2015-09-18 04:55:33 +08:00
|
|
|
int __attribute__((ms_abi)) wvsprintfA(char *, const char *, __ms_va_list);
|
2010-10-05 22:55:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void f(char *buffer, unsigned count, const char* format, va_list argptr) {
|
|
|
|
vsnprintf(buffer, count, format, argptr);
|
|
|
|
}
|
2015-09-18 04:55:33 +08:00
|
|
|
|
|
|
|
void g(char *buffer, const char *format, __ms_va_list argptr) {
|
|
|
|
wvsprintfA(buffer, format, argptr);
|
|
|
|
}
|