From 1f8e21c6a33b18beec56af2d5774d0411d548ca2 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 18 Nov 2014 23:46:18 +0000 Subject: [PATCH] Modify tests to check that va_copy is only defined in C++11 and beyond. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222282 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/depr/depr.c.headers/stdarg_h.pass.cpp | 10 ++++++++-- test/language.support/support.runtime/cstdarg.pass.cpp | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/test/depr/depr.c.headers/stdarg_h.pass.cpp b/test/depr/depr.c.headers/stdarg_h.pass.cpp index 2c18c5d2..1bf73521 100644 --- a/test/depr/depr.c.headers/stdarg_h.pass.cpp +++ b/test/depr/depr.c.headers/stdarg_h.pass.cpp @@ -15,8 +15,14 @@ #error va_arg not defined #endif -#ifndef va_copy -#error va_copy not defined +#if __cplusplus >= 201103L +# ifndef va_copy +# error va_copy not defined when c++ >= 11 +# endif +#else +# ifdef va_copy +# error va_copy not defined when c++ < 11 +# endif #endif #ifndef va_end diff --git a/test/language.support/support.runtime/cstdarg.pass.cpp b/test/language.support/support.runtime/cstdarg.pass.cpp index 00baf802..c9d00498 100644 --- a/test/language.support/support.runtime/cstdarg.pass.cpp +++ b/test/language.support/support.runtime/cstdarg.pass.cpp @@ -15,8 +15,14 @@ #error va_arg not defined #endif -#ifndef va_copy -#error va_copy not defined +#if __cplusplus >= 201103L +# ifndef va_copy +# error va_copy not defined when c++ >= 11 +# endif +#else +# ifdef va_copy +# error va_copy not defined when c++ < 11 +# endif #endif #ifndef va_end