Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 3 | // 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 Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // test <stdarg.h> |
| 10 | |
| 11 | #include <stdarg.h> |
| 12 | |
Eric Fiselier | f2f2a63 | 2016-06-14 21:31:42 +0000 | [diff] [blame] | 13 | #include "test_macros.h" |
| 14 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 15 | #ifndef va_arg |
| 16 | #error va_arg not defined |
| 17 | #endif |
| 18 | |
Eric Fiselier | f2f2a63 | 2016-06-14 21:31:42 +0000 | [diff] [blame] | 19 | #if TEST_STD_VER >= 11 |
Eric Fiselier | e15f86c | 2014-11-18 23:46:18 +0000 | [diff] [blame] | 20 | # ifndef va_copy |
Eric Fiselier | 4fb4ab5 | 2014-11-19 20:01:26 +0000 | [diff] [blame] | 21 | # error va_copy is not defined when c++ >= 11 |
Eric Fiselier | e15f86c | 2014-11-18 23:46:18 +0000 | [diff] [blame] | 22 | # endif |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 23 | #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 Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 33 | int main(int, char**) |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 34 | { |
| 35 | va_list va; |
Eric Fiselier | 203f687 | 2015-07-18 22:51:51 +0000 | [diff] [blame] | 36 | ((void)va); |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 37 | |
| 38 | return 0; |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 39 | } |