[libcxx] r222282 - Modify tests to check that va_copy is only defined in C++11 and beyond.

Eric Fiselier eric at efcs.ca
Tue Nov 18 15:46:18 PST 2014


Author: ericwf
Date: Tue Nov 18 17:46:18 2014
New Revision: 222282

URL: http://llvm.org/viewvc/llvm-project?rev=222282&view=rev
Log:
Modify tests to check that va_copy is only defined in C++11 and beyond.

Modified:
    libcxx/trunk/test/depr/depr.c.headers/stdarg_h.pass.cpp
    libcxx/trunk/test/language.support/support.runtime/cstdarg.pass.cpp

Modified: libcxx/trunk/test/depr/depr.c.headers/stdarg_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.c.headers/stdarg_h.pass.cpp?rev=222282&r1=222281&r2=222282&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.c.headers/stdarg_h.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.c.headers/stdarg_h.pass.cpp Tue Nov 18 17:46:18 2014
@@ -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

Modified: libcxx/trunk/test/language.support/support.runtime/cstdarg.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/language.support/support.runtime/cstdarg.pass.cpp?rev=222282&r1=222281&r2=222282&view=diff
==============================================================================
--- libcxx/trunk/test/language.support/support.runtime/cstdarg.pass.cpp (original)
+++ libcxx/trunk/test/language.support/support.runtime/cstdarg.pass.cpp Tue Nov 18 17:46:18 2014
@@ -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





More information about the cfe-commits mailing list