1 // Like the compiler, the static analyzer treats some functions differently if
2 // they come from a system header -- for example, it is assumed that system
3 // functions do not arbitrarily free() their parameters, and that some bugs
4 // found in system headers cannot be fixed by the user and should be
7 #pragma clang system_header
10 #define restrict /*restrict*/
13 typedef struct _FILE
FILE;
15 typedef __builtin_va_list
va_list;
17 #define va_start(ap, param) __builtin_va_start(ap, param)
18 #define va_end(ap) __builtin_va_end(ap)
19 #define va_arg(ap, type) __builtin_va_arg(ap, type)
20 #define va_copy(dst, src) __builtin_va_copy(dst, src)
22 int vprintf (const char *restrict format
, va_list arg
);
24 int vsprintf (char *restrict s
, const char *restrict format
, va_list arg
);
26 int vfprintf(FILE *stream
, const char *format
, va_list ap
);
28 int vfscanf(FILE *stream
, const char *format
, va_list ap
);
30 int some_library_function(int n
, va_list arg
);
32 // No warning from system header.
33 inline void __impl_detail(int fst
, ...) {
35 (void)va_arg(va
, int);