blob: feb9c4a460f38e4c93ea4c374ec572c865057e35 [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:40 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Howard Hinnant3e519522010-05-11 19:42:16 +00006//
7//===----------------------------------------------------------------------===//
8
9// test <stdarg.h>
10
11#include <stdarg.h>
12
Eric Fiselierf2f2a632016-06-14 21:31:42 +000013#include "test_macros.h"
14
Howard Hinnant3e519522010-05-11 19:42:16 +000015#ifndef va_arg
16#error va_arg not defined
17#endif
18
Eric Fiselierf2f2a632016-06-14 21:31:42 +000019#if TEST_STD_VER >= 11
Eric Fiseliere15f86c2014-11-18 23:46:18 +000020# ifndef va_copy
Eric Fiselier4fb4ab52014-11-19 20:01:26 +000021# error va_copy is not defined when c++ >= 11
Eric Fiseliere15f86c2014-11-18 23:46:18 +000022# endif
Howard Hinnant3e519522010-05-11 19:42:16 +000023#endif
24
25#ifndef va_end
26#error va_end not defined
27#endif
28
29#ifndef va_start
30#error va_start not defined
31#endif
32
JF Bastien2df59c52019-02-04 20:31:13 +000033int main(int, char**)
Howard Hinnant3e519522010-05-11 19:42:16 +000034{
35 va_list va;
Eric Fiselier203f6872015-07-18 22:51:51 +000036 ((void)va);
JF Bastien2df59c52019-02-04 20:31:13 +000037
38 return 0;
Howard Hinnant3e519522010-05-11 19:42:16 +000039}