Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / Inputs / system-header-simulator-for-valist.h
blob7299b61353d460d44841c900c3c1221a4627923f
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
5 // suppressed.
7 #pragma clang system_header
9 #ifdef __cplusplus
10 #define restrict /*restrict*/
11 #endif
13 typedef __builtin_va_list va_list;
15 #define va_start(ap, param) __builtin_va_start(ap, param)
16 #define va_end(ap) __builtin_va_end(ap)
17 #define va_arg(ap, type) __builtin_va_arg(ap, type)
18 #define va_copy(dst, src) __builtin_va_copy(dst, src)
20 int vprintf (const char *restrict format, va_list arg);
22 int vsprintf (char *restrict s, const char *restrict format, va_list arg);
24 int some_library_function(int n, va_list arg);
26 // No warning from system header.
27 inline void __impl_detail(int fst, ...) {
28 va_list va;
29 (void)va_arg(va, int);