1 // Test this without pch.
2 // RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include %S/Inputs/va_arg.h %s -emit-llvm -o -
3 // REQUIRES: x86-registered-target
4
5 // Test with pch.
6 // RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -emit-pch -x c++-header -o %t %S/Inputs/va_arg.h
7 // RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o -
8
9 typedef __SIZE_TYPE__ size_t;
10
11 extern "C" {
12 int vsnprintf(char * , size_t, const char * , va_list) ;
13 int __attribute__((ms_abi)) wvsprintfA(char *, const char *, __ms_va_list);
14 }
15
f(char * buffer,unsigned count,const char * format,va_list argptr)16 void f(char *buffer, unsigned count, const char* format, va_list argptr) {
17 vsnprintf(buffer, count, format, argptr);
18 }
19
g(char * buffer,const char * format,__ms_va_list argptr)20 void g(char *buffer, const char *format, __ms_va_list argptr) {
21 wvsprintfA(buffer, format, argptr);
22 }
23