Path: blob/main/contrib/llvm-project/clang/lib/Headers/__stdarg_va_arg.h
35233 views
/*===---- __stdarg_va_arg.h - Definitions of va_start, va_arg, va_end-------===1*2* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3* See https://llvm.org/LICENSE.txt for license information.4* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5*6*===-----------------------------------------------------------------------===7*/89#ifndef va_arg1011#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L12/* C23 does not require the second parameter for va_start. */13#define va_start(ap, ...) __builtin_va_start(ap, 0)14#else15/* Versions before C23 do require the second parameter. */16#define va_start(ap, param) __builtin_va_start(ap, param)17#endif18#define va_end(ap) __builtin_va_end(ap)19#define va_arg(ap, type) __builtin_va_arg(ap, type)2021#endif222324