[libcxx-commits] [libcxx] 61f2b3e - [libc++] Move several defines to ADDITIONAL_COMPILE_FLAGS in the test suite

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 3 10:17:49 PST 2022


Author: Louis Dionne
Date: 2022-03-03T13:17:35-05:00
New Revision: 61f2b3ed2183d24252561f9b48007e6cde937ce4

URL: https://github.com/llvm/llvm-project/commit/61f2b3ed2183d24252561f9b48007e6cde937ce4
DIFF: https://github.com/llvm/llvm-project/commit/61f2b3ed2183d24252561f9b48007e6cde937ce4.diff

LOG: [libc++] Move several defines to ADDITIONAL_COMPILE_FLAGS in the test suite

This avoids -Wmacro-redefined when turning warnings on with GCC.

Added: 
    

Modified: 
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
index 174560c243ca0..087a498642881 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
@@ -7,14 +7,14 @@
 //===----------------------------------------------------------------------===//
 
 // <algorithm>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<RandomAccessIterator Iter>
 //   requires ShuffleIterator<Iter>
 //   void
 //   random_shuffle(Iter first, Iter last);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <algorithm>
 #include <cassert>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
index 86087565770af..5a2b58f4a5354 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // <algorithm>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<RandomAccessIterator Iter, Callable<auto, Iter::
diff erence_type> Rand>
 //   requires ShuffleIterator<Iter>
@@ -15,7 +14,8 @@
 //   void
 //   random_shuffle(Iter first, Iter last, Rand&& rand);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <algorithm>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
index 3be63bc4e59b4..07d27cb415bcc 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
@@ -13,8 +13,7 @@
 // auto_ptr& operator=(auto_ptr& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
index a461636ccea99..df88e2c0427b2 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
@@ -13,8 +13,7 @@
 // auto_ptr(auto_ptr& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
index 90566d10160ac..e38742091e9eb 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
@@ -12,7 +12,7 @@
 
 // template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
index 29bc973115e20..85754ebc18ee7 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
@@ -13,8 +13,7 @@
 // template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
index 814b18a0ca984..dd043e8d54165 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
@@ -12,7 +12,7 @@
 
 // auto_ptr(auto_ptr& a) throw();
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
index d115bc9f47c22..59919114abd3f 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
@@ -13,8 +13,7 @@
 // auto_ptr(auto_ptr& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
index e92e40e8b0773..c830d82d5b29e 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
@@ -12,7 +12,7 @@
 
 // explicit auto_ptr(X* p =0) throw();
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
index 68bdaa4837b00..d337366a6b925 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
@@ -13,8 +13,7 @@
 // explicit auto_ptr(X* p =0) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
index e6c4a86612322..3b1bc9a884f4c 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
@@ -13,8 +13,7 @@
 // auto_ptr& operator=(auto_ptr_ref<X> r) throw()
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
index 895465b0e982c..e19c1708d5676 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
@@ -13,8 +13,7 @@
 // auto_ptr(auto_ptr_ref<X> r) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
index 13e57ed03bfd7..115716c2a109b 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
@@ -13,8 +13,7 @@
 // template<class Y> operator auto_ptr<Y>() throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
index ad39592fa1580..b3e8d95f18438 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
@@ -13,8 +13,7 @@
 // template<class Y> operator auto_ptr_ref<Y>() throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
index ad1760926b8e6..d06f44a0f832b 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
@@ -13,8 +13,7 @@
 // X& operator*() const throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
index e423451bec551..290a5132b6580 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
@@ -13,8 +13,7 @@
 // X& operator*() const throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
index 600f2b3485be3..960ee0e738c8a 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
@@ -13,8 +13,7 @@
 // X* release() throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
index 7fd113954f09c..1b5a09525b751 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
@@ -13,8 +13,7 @@
 // void reset(X* p=0) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
index 8b0b51cf3ace9..4f16539446870 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
@@ -17,8 +17,7 @@
 // };
 
 // REQUIRES: c++03 || c++11 || c++14
-
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
index a6389c86a5619..298d0593e02b5 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
@@ -8,9 +8,9 @@
 
 // <functional>
 // pointer_to_binary_function
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
index 1d5a774c698f8..2faf6f6d90625 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // pointer_to_binary_function
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
index c66a973440117..dedc7f01bbef4 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
@@ -8,9 +8,9 @@
 
 // <functional>
 // pointer_to_unary_function
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
index ddd52f6cce4e0..0b6b32b55f824 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // pointer_to_unary_function
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
index 1de1b8bf3ce08..e6e82650d34b3 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
@@ -11,9 +11,9 @@
 // template <CopyConstructible Arg, Returnable Result>
 // pointer_to_unary_function<Arg, Result>
 // ptr_fun(Result (*f)(Arg));
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
index 23c4e66e35556..78fe36515acc3 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template <CopyConstructible Arg, Returnable Result>
 // pointer_to_unary_function<Arg, Result>
 // ptr_fun(Result (*f)(Arg));
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
index b5bb90ee6dafa..155f2ef839b80 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
@@ -11,9 +11,9 @@
 // template <CopyConstructible Arg1, CopyConstructible Arg2, Returnable Result>
 // pointer_to_binary_function<Arg1,Arg2,Result>
 // ptr_fun(Result (*f)(Arg1, Arg2));
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
index 21febaaf283d8..80285fa2cdb2a 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template <CopyConstructible Arg1, CopyConstructible Arg2, Returnable Result>
 // pointer_to_binary_function<Arg1,Arg2,Result>
 // ptr_fun(Result (*f)(Arg1, Arg2));
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
index 135e166154b68..ef8dc40a1427d 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   const_mem_fun_t<S,T>
 //   mem_fun(S (T::*f)() const);
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
index 9c515b57893e3..8746f5980d592 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<cReturnable S, ClassType T>
 //   const_mem_fun_t<S,T>
 //   mem_fun(S (T::*f)() const);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
index a99bfd222b5bb..58df539498ff9 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   const_mem_fun1_t<S,T,A>
 //   mem_fun(S (T::*f)(A) const);
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
index 27f136b6ded97..d888fc2c071bd 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<Returnable S, ClassType T, CopyConstructible A>
 //   const_mem_fun1_t<S,T,A>
 //   mem_fun(S (T::*f)(A) const);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
index b1114e30a01b7..114acbde97419 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // const_mem_fun1_ref_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
index 178bc18fb76c3..ae311260830a7 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // const_mem_fun1_ref_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
index 8571f08c44ae0..7e875c151133a 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // const_mem_fun1_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
index 1c99e220e0ef7..60c00ee8c5313 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // const_mem_fun1_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
index be8ad9c30edd4..061b4842f912a 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   const_mem_fun_ref_t<S,T>
 //   mem_fun_ref(S (T::*f)() const);
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
index 6831576010dca..ece3eca716200 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<Returnable S, ClassType T>
 //   const_mem_fun_ref_t<S,T>
 //   mem_fun_ref(S (T::*f)() const);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
index 7db007899d790..7257dcf766d2c 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   const_mem_fun1_ref_t<S,T,A>
 //   mem_fun_ref(S (T::*f)(A) const);
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
index bb32ec8864ad2..d27f38e2cdef6 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<Returnable S, ClassType T, CopyConstructible A>
 //   const_mem_fun1_ref_t<S,T,A>
 //   mem_fun_ref(S (T::*f)(A) const);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
index 4a54da4d232c3..3838af9093643 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // const_mem_fun_ref_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
index 7e5af83f7ee37..6830a07352a15 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // const_mem_fun_ref_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
index 347bd58d7c7be..107528fb8fe18 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // const_mem_fun_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
index 1d9d211a86d82..7b5842e8c3e9f 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // const_mem_fun_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
index 4ca1802cb4324..c72c29f6da47e 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   mem_fun_t<S,T>
 //   mem_fun(S (T::*f)());
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
index 624fa8d8baf65..987cd36cef5d3 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<Returnable S, ClassType T>
 //   mem_fun_t<S,T>
 //   mem_fun(S (T::*f)());
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
index ade07874507f5..2d6fe13c81427 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   mem_fun1_t<S,T,A>
 //   mem_fun(S (T::*f)(A));
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
index 1b84537472471..5cdb2043f5c50 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<Returnable S, ClassType T, CopyConstructible A>
 //   mem_fun1_t<S,T,A>
 //   mem_fun(S (T::*f)(A));
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
index 26d268120a025..fe633f44610d6 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // mem_fun1_ref_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
index 5919a51d0ff37..915ce5b5ab1c6 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // mem_fun1_ref_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
index d3de10ff6cdcd..61d38e0a4d006 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // mem_fun1_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
index c7c9c45c3026c..e36ecec59282a 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // mem_fun1_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
index 2cb88c8a5043f..fd69470766659 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   mem_fun_ref_t<S,T>
 //   mem_fun_ref(S (T::*f)());
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
index 1465bdbd89f98..f989cd0ebecf2 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<Returnable S, ClassType T>
 //   mem_fun_ref_t<S,T>
 //   mem_fun_ref(S (T::*f)());
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
index 2887ed78a1a88..c4ac53c6f3f51 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
@@ -12,9 +12,9 @@
 //   mem_fun1_ref_t<S,T,A>
 //   mem_fun_ref(S (T::*f)(A));
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
index 7605ff15b91c4..b2542398b2a81 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<Returnable S, ClassType T, CopyConstructible A>
 //   mem_fun1_ref_t<S,T,A>
 //   mem_fun_ref(S (T::*f)(A));
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
index e5891a1c6b860..b87821e8bd93f 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // mem_fun_ref_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
index 4cd4cb9c0f8ab..645ca9f4e1bd3 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // mem_fun_ref_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
index 3cf7f2ce68526..d7f2be2db6242 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
@@ -10,9 +10,9 @@
 
 // mem_fun_t
 // Removed in c++17
-// UNSUPPORTED: c++03, c++11, c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: c++03, c++11, c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
index 5f62ebfe7c66c..3497bcf4b3383 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // mem_fun_t
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
index c820bcff06b6c..39a0b17157404 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template <class Fn, class T>
 //   binder1st<Fn>
 //   bind1st(const Fn& fn, const T& x);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
index 472ca0e62c8ab..b7cfd603b6a01 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
@@ -7,13 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template <class Fn, class T>
 //   binder2nd<Fn>
 //   bind2nd(const Fn& op, const T& x);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
index b99b33c21889c..2f4ce6ff67f93 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template <class Fn>
 // class binder1st
@@ -23,7 +22,8 @@
 //   typename Fn::result_type operator()(typename Fn::first_argument_type& x) const;
 // };
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
index 444bc5820944c..c4c65eff481d0 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // <functional>
-// REQUIRES: c++03 || c++11 || c++14
 
 // template <class Fn>
 // class binder2nd
@@ -23,7 +22,8 @@
 //   typename Fn::result_type operator()(typename Fn::first_argument_type& x) const;
 // };
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
index 9621434dc3692..ed601b52c5376 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
@@ -9,11 +9,11 @@
 // <memory>
 
 // shared_ptr
-// REQUIRES: c++03 || c++11 || c++14
 
 // template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
index 47b5190aecd18..7bf1501d1bcd2 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
@@ -12,7 +12,7 @@
 
 // shared_ptr& operator=(const shared_ptr& r);
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
index f1ffba637b345..117503c18abed 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
@@ -9,9 +9,9 @@
 // <memory>
 
 // template<class Y> explicit shared_ptr(auto_ptr<Y>&& r);
-// REQUIRES: c++03 || c++11 || c++14
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// REQUIRES: c++03 || c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <new>

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
index 4d13ba9c52018..587715a3d89df 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
@@ -9,6 +9,7 @@
 // libc++ cannot safely provide the auto_ptr constructor without rvalue
 // references.
 // REQUIRES: c++11 || c++14
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 // <memory>
 
@@ -16,8 +17,6 @@
 
 // template <class U> unique_ptr(auto_ptr<U>&&) noexcept
 
-#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
-
 #include <memory>
 #include <utility>
 #include <cassert>


        


More information about the libcxx-commits mailing list