[libcxx-commits] [libcxx] 2fd7d36 - [libc++] Make the verify-support feature implicit

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 30 08:47:22 PDT 2020


Author: Louis Dionne
Date: 2020-04-30T11:47:12-04:00
New Revision: 2fd7d364cd999c743b5bdefa7ee9e5630f3564ad

URL: https://github.com/llvm/llvm-project/commit/2fd7d364cd999c743b5bdefa7ee9e5630f3564ad
DIFF: https://github.com/llvm/llvm-project/commit/2fd7d364cd999c743b5bdefa7ee9e5630f3564ad.diff

LOG: [libc++] Make the verify-support feature implicit

Tests that require support for Clang-verify are already marked as such
explicitly by their extension, which is .verify.cpp. Requiring the use
of an explicit Lit feature is, after thought, not really helpful.

This is a change in design: we have been bitten in the past by tests not
being enabled when we thought they were. However, the issue was mostly
with file extensions being ignored. The fix for that is not to blindly
require explicit features all the time, but instead to report all files
that are in the suite but that don't match any known test format. This
can be implemented in a follow-up patch.

Added: 
    libcxx/test/libcxx/selftest/newformat/fail.cpp/lit.local.cfg

Modified: 
    libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
    libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
    libcxx/test/libcxx/containers/associative/non_const_comparator.incomplete.verify.cpp
    libcxx/test/libcxx/containers/associative/non_const_comparator.verify.cpp
    libcxx/test/libcxx/containers/unord/non_const_comparator.incomplete.verify.cpp
    libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp
    libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
    libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.verify.cpp
    libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
    libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
    libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
    libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
    libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
    libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
    libcxx/test/libcxx/experimental/filesystem/deprecated.verify.cpp
    libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics-unmarked.verify.cpp
    libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics.verify.cpp
    libcxx/test/libcxx/selftest/newformat/verify.cpp/right-diagnostic.verify.cpp
    libcxx/test/libcxx/selftest/newformat/verify.cpp/wrong-diagnostic.verify.cpp
    libcxx/test/libcxx/thread/atomic.availability.verify.cpp
    libcxx/test/libcxx/thread/barrier.availability.verify.cpp
    libcxx/test/libcxx/thread/latch.availability.verify.cpp
    libcxx/test/libcxx/thread/semaphore.availability.verify.cpp
    libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
    libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
    libcxx/test/std/containers/associative/map/map.access/empty.verify.cpp
    libcxx/test/std/containers/associative/multimap/empty.verify.cpp
    libcxx/test/std/containers/associative/multiset/empty.verify.cpp
    libcxx/test/std/containers/associative/set/empty.verify.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.verify.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.verify.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.verify.cpp
    libcxx/test/std/containers/sequences/array/empty.verify.cpp
    libcxx/test/std/containers/sequences/deque/deque.capacity/empty.verify.cpp
    libcxx/test/std/containers/sequences/forwardlist/empty.verify.cpp
    libcxx/test/std/containers/sequences/list/list.capacity/empty.verify.cpp
    libcxx/test/std/containers/sequences/vector.bool/empty.verify.cpp
    libcxx/test/std/containers/sequences/vector/vector.capacity/empty.verify.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/copy.move_only.verify.cpp
    libcxx/test/std/containers/unord/unord.map/empty.verify.cpp
    libcxx/test/std/containers/unord/unord.multimap/empty.verify.cpp
    libcxx/test/std/containers/unord/unord.multiset/empty.verify.cpp
    libcxx/test/std/containers/unord/unord.set/empty.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
    libcxx/test/std/iterators/iterator.container/empty.array.verify.cpp
    libcxx/test/std/iterators/iterator.container/empty.container.verify.cpp
    libcxx/test/std/iterators/iterator.container/empty.initializer_list.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.verify.cpp
    libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.verify.cpp
    libcxx/test/std/re/re.results/re.results.size/empty.verify.cpp
    libcxx/test/std/strings/basic.string/string.capacity/empty.verify.cpp
    libcxx/test/std/strings/string.view/string.view.capacity/empty.verify.cpp
    libcxx/test/std/thread/futures/futures.async/async.verify.cpp
    libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.verify.cpp
    libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.verify.cpp
    libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.verify.cpp
    libcxx/utils/libcxx/test/config.py
    libcxx/utils/libcxx/test/format.py
    libcxx/utils/libcxx/test/newformat.py

Removed: 
    libcxx/test/libcxx/selftest/newformat/convenience_substitutions/verify.sh.cpp


################################################################################
diff  --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
index 2dc80131c605..012234d97eac 100644
--- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
@@ -19,7 +19,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03, c++11
-// REQUIRES: verify-support
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
 

diff  --git a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
index 7bc21851b712..9017471fede7 100644
--- a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
+++ b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
@@ -10,7 +10,7 @@
 // when -fdelayed-template-parsing is enabled, like it is on Windows.
 // XFAIL: LIBCXX-WINDOWS-FIXME
 
-// REQUIRES: verify-support, diagnose-if-support
+// REQUIRES: diagnose-if-support
 // UNSUPPORTED: libcpp-has-no-threads
 
 // <atomic>

diff  --git a/libcxx/test/libcxx/containers/associative/non_const_comparator.incomplete.verify.cpp b/libcxx/test/libcxx/containers/associative/non_const_comparator.incomplete.verify.cpp
index 8e3ec7c63589..e8c02dc8dfee 100644
--- a/libcxx/test/libcxx/containers/associative/non_const_comparator.incomplete.verify.cpp
+++ b/libcxx/test/libcxx/containers/associative/non_const_comparator.incomplete.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 // Test that libc++ does not generate a warning diagnostic about the comparator
 // too early for containers of incomplete types.

diff  --git a/libcxx/test/libcxx/containers/associative/non_const_comparator.verify.cpp b/libcxx/test/libcxx/containers/associative/non_const_comparator.verify.cpp
index 9a9a1c6d6d12..b4db1949cbdf 100644
--- a/libcxx/test/libcxx/containers/associative/non_const_comparator.verify.cpp
+++ b/libcxx/test/libcxx/containers/associative/non_const_comparator.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: diagnose-if-support, verify-support
+// REQUIRES: diagnose-if-support
 
 // Test that libc++ generates a warning diagnostic when the container is
 // provided a non-const callable comparator.

diff  --git a/libcxx/test/libcxx/containers/unord/non_const_comparator.incomplete.verify.cpp b/libcxx/test/libcxx/containers/unord/non_const_comparator.incomplete.verify.cpp
index b2525fbf0f03..ff83c01e47df 100644
--- a/libcxx/test/libcxx/containers/unord/non_const_comparator.incomplete.verify.cpp
+++ b/libcxx/test/libcxx/containers/unord/non_const_comparator.incomplete.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 // Test that libc++ does not generate a warning diagnostic about the comparator
 // or the hasher too early for containers of incomplete types.

diff  --git a/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp b/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp
index c1027adbc8e4..a1440562cbd7 100644
--- a/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp
+++ b/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: diagnose-if-support, verify-support
+// REQUIRES: diagnose-if-support
 
 // Test that libc++ generates a warning diagnostic when the container is
 // provided a non-const callable comparator or a non-const hasher.

diff  --git a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
index 31019f3e9fc1..65e995c1a573 100644
--- a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
@@ -20,7 +20,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
 

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp b/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
index eedcb3e8c95b..8f848653401a 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// REQUIRES: verify-support
 // UNSUPPORTED: c++98 || c++03
 
 #include <cstdio>

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
index 8b919e4f3b54..2cef6ab3a7b9 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
@@ -15,7 +15,6 @@
 // Deprecated in C++17
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
index 8c132e5f06c4..d3f88d21ba0e 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 // <memory>
 

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
index 844bb553e968..7318876d8e7b 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
@@ -14,7 +14,6 @@
 // Deprecated in C++17
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.verify.cpp
index 73e22feffaa9..4c6eaa85324d 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.verify.cpp
@@ -28,7 +28,6 @@
 // Deprecated in C++17
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 // Clang 6 does not handle the deprecated attribute on template members properly,
 // so the rebind<int> check below fails.

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.verify.cpp
index 8133fff3b7ce..6f692b5cdd39 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.verify.cpp
@@ -22,7 +22,6 @@
 // Deprecated in C++17
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 

diff  --git a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
index c5f155269a1a..ee789e86ce86 100644
--- a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
@@ -10,7 +10,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 

diff  --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
index 0888684ec354..687f170f5b97 100644
--- a/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
@@ -16,8 +16,6 @@
 // GCC 7 is the first version to introduce [[nodiscard]]
 // UNSUPPORTED: gcc-5, gcc-6
 
-// REQUIRES: verify-support
-
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_NODISCARD
 
 #include <__config>

diff  --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
index 1a21b48c009b..99b917badfe9 100644
--- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
@@ -8,7 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 // GCC 7 is the first version to introduce [[nodiscard]]
 // UNSUPPORTED: gcc-5, gcc-6

diff  --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
index 888785e31d94..f1ae16d20a72 100644
--- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
@@ -8,7 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 // GCC 7 is the first version to introduce [[nodiscard]]
 // UNSUPPORTED: gcc-5, gcc-6

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
index 39861eddd85c..ec6711d03a8d 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
@@ -11,7 +11,6 @@
 //	#define _LIBCPP_NODISCARD_AFTER_CXX17 [[nodiscard]]
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <__config>
 

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
index 6dbeb7f71024..cad21fc8e877 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
@@ -8,7 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 // AppleClang9 doesn't yet support C++17's implicitly synthesized deduction
 // guides from existing ctors, needed by default_searcher() below.

diff  --git a/libcxx/test/libcxx/experimental/filesystem/deprecated.verify.cpp b/libcxx/test/libcxx/experimental/filesystem/deprecated.verify.cpp
index 4497bc2faf6a..7ba2e5c7516b 100644
--- a/libcxx/test/libcxx/experimental/filesystem/deprecated.verify.cpp
+++ b/libcxx/test/libcxx/experimental/filesystem/deprecated.verify.cpp
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// REQUIRES: verify-support
 // UNSUPPORTED: c++98, c++03
 
 // <experimental/filesystem>

diff  --git a/libcxx/test/libcxx/selftest/newformat/convenience_substitutions/verify.sh.cpp b/libcxx/test/libcxx/selftest/newformat/convenience_substitutions/verify.sh.cpp
deleted file mode 100644
index 664d25826a8d..000000000000
--- a/libcxx/test/libcxx/selftest/newformat/convenience_substitutions/verify.sh.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Make sure that we provide the %{verify} substitution. We can only test
-// this when the verify-support feature is enabled, and it's 
diff icult to
-// check that it's enabled when it should be, so we just trust that it is.
-
-// REQUIRES: verify-support
-// RUN: test -n "%{verify}"
-
-// RUN: %{cxx} %s %{flags} %{compile_flags} -fsyntax-only %{verify}
-
-// expected-no-diagnostics

diff  --git a/libcxx/test/libcxx/selftest/newformat/fail.cpp/lit.local.cfg b/libcxx/test/libcxx/selftest/newformat/fail.cpp/lit.local.cfg
new file mode 100644
index 000000000000..2cd7606f4c4e
--- /dev/null
+++ b/libcxx/test/libcxx/selftest/newformat/fail.cpp/lit.local.cfg
@@ -0,0 +1,6 @@
+import libcxx.test.newformat
+
+# The tests in this directory need to know whether Clang-verify is supported
+# to work properly.
+if libcxx.test.newformat._supportsVerify(config):
+    config.available_features.add('verify-support')

diff  --git a/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics-unmarked.verify.cpp b/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics-unmarked.verify.cpp
index e0ca921f3438..18ff67065382 100644
--- a/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics-unmarked.verify.cpp
+++ b/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics-unmarked.verify.cpp
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// REQUIRES: verify-support
-
 // XFAIL: *
 
 // Make sure the test DOES NOT pass if there are no diagnostics, but we didn't

diff  --git a/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics.verify.cpp b/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics.verify.cpp
index 1f6124cf8dd9..d622c786ee37 100644
--- a/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics.verify.cpp
+++ b/libcxx/test/libcxx/selftest/newformat/verify.cpp/no-diagnostics.verify.cpp
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// REQUIRES: verify-support
-
 // Make sure the test passes if we expected no diagnostics
 
 // expected-no-diagnostics

diff  --git a/libcxx/test/libcxx/selftest/newformat/verify.cpp/right-diagnostic.verify.cpp b/libcxx/test/libcxx/selftest/newformat/verify.cpp/right-diagnostic.verify.cpp
index d3afd9745761..8bca568707dc 100644
--- a/libcxx/test/libcxx/selftest/newformat/verify.cpp/right-diagnostic.verify.cpp
+++ b/libcxx/test/libcxx/selftest/newformat/verify.cpp/right-diagnostic.verify.cpp
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// REQUIRES: verify-support
-
 // Make sure the test passes if the expected diagnostic is correct.
 
 struct Foo { };

diff  --git a/libcxx/test/libcxx/selftest/newformat/verify.cpp/wrong-diagnostic.verify.cpp b/libcxx/test/libcxx/selftest/newformat/verify.cpp/wrong-diagnostic.verify.cpp
index 02f9353cf18a..3bc2ba841ad9 100644
--- a/libcxx/test/libcxx/selftest/newformat/verify.cpp/wrong-diagnostic.verify.cpp
+++ b/libcxx/test/libcxx/selftest/newformat/verify.cpp/wrong-diagnostic.verify.cpp
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// REQUIRES: verify-support
-
 // XFAIL: *
 
 // Make sure the test DOES NOT pass if the expected diagnostic is wrong.

diff  --git a/libcxx/test/libcxx/thread/atomic.availability.verify.cpp b/libcxx/test/libcxx/thread/atomic.availability.verify.cpp
index ad99a870a048..3595fa0f5fe6 100644
--- a/libcxx/test/libcxx/thread/atomic.availability.verify.cpp
+++ b/libcxx/test/libcxx/thread/atomic.availability.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11
-// REQUIRES: verify-support
 // REQUIRES: with_system_cxx_lib=macosx
 // REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
 

diff  --git a/libcxx/test/libcxx/thread/barrier.availability.verify.cpp b/libcxx/test/libcxx/thread/barrier.availability.verify.cpp
index e796e109a113..3b07fa81b00a 100644
--- a/libcxx/test/libcxx/thread/barrier.availability.verify.cpp
+++ b/libcxx/test/libcxx/thread/barrier.availability.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11
-// REQUIRES: verify-support
 // REQUIRES: with_system_cxx_lib=macosx
 // REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
 

diff  --git a/libcxx/test/libcxx/thread/latch.availability.verify.cpp b/libcxx/test/libcxx/thread/latch.availability.verify.cpp
index 12eb7b3dbfb4..b1b49ebe6fd3 100644
--- a/libcxx/test/libcxx/thread/latch.availability.verify.cpp
+++ b/libcxx/test/libcxx/thread/latch.availability.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11
-// REQUIRES: verify-support
 // REQUIRES: with_system_cxx_lib=macosx
 // REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
 

diff  --git a/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp b/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp
index 534569f0d597..9325f505b7ab 100644
--- a/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp
+++ b/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11
-// REQUIRES: verify-support
 // REQUIRES: with_system_cxx_lib=macosx
 // REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
 

diff  --git a/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp b/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
index f848d5ed6223..7028d561e483 100644
--- a/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: libcpp-has-no-threads
-// REQUIRES: verify-support
 
 // [[nodiscard]] on constructors isn't supported by all compilers
 // UNSUPPORTED: clang-6, clang-7, clang-8, clang-9

diff  --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
index f8a162ce1bee..544a43e656b1 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
@@ -12,7 +12,6 @@
 // Check that libc++'s emulation of std::function is deprecated in C++03
 
 // REQUIRES: c++98 || c++03
-// REQUIRES: verify-support
 
 #include <functional>
 #include "test_macros.h"

diff  --git a/libcxx/test/std/containers/associative/map/map.access/empty.verify.cpp b/libcxx/test/std/containers/associative/map/map.access/empty.verify.cpp
index 2ef8cdf17d0d..07d5654b446e 100644
--- a/libcxx/test/std/containers/associative/map/map.access/empty.verify.cpp
+++ b/libcxx/test/std/containers/associative/map/map.access/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <map>
 

diff  --git a/libcxx/test/std/containers/associative/multimap/empty.verify.cpp b/libcxx/test/std/containers/associative/multimap/empty.verify.cpp
index 644d1ab97a53..5970528f7e2b 100644
--- a/libcxx/test/std/containers/associative/multimap/empty.verify.cpp
+++ b/libcxx/test/std/containers/associative/multimap/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <map>
 

diff  --git a/libcxx/test/std/containers/associative/multiset/empty.verify.cpp b/libcxx/test/std/containers/associative/multiset/empty.verify.cpp
index 5b1fc9ba6d4b..86c8b7c82a1e 100644
--- a/libcxx/test/std/containers/associative/multiset/empty.verify.cpp
+++ b/libcxx/test/std/containers/associative/multiset/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <set>
 

diff  --git a/libcxx/test/std/containers/associative/set/empty.verify.cpp b/libcxx/test/std/containers/associative/set/empty.verify.cpp
index 33bf12cdae5f..d1a1daeba490 100644
--- a/libcxx/test/std/containers/associative/set/empty.verify.cpp
+++ b/libcxx/test/std/containers/associative/set/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <set>
 

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.verify.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.verify.cpp
index 1c00755cbc2d..85df85ccd7a2 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.verify.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <queue>
 

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.verify.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.verify.cpp
index e094421f7c97..d9119a5c3519 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.verify.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <queue>
 

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.verify.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.verify.cpp
index e419b0d7dee6..4f43b5eee87e 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.verify.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <stack>
 

diff  --git a/libcxx/test/std/containers/sequences/array/empty.verify.cpp b/libcxx/test/std/containers/sequences/array/empty.verify.cpp
index 96f8a2be5b2d..cf1fe5f1c0d2 100644
--- a/libcxx/test/std/containers/sequences/array/empty.verify.cpp
+++ b/libcxx/test/std/containers/sequences/array/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <array>
 

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.verify.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.verify.cpp
index 793baf9b78c0..699fd93aa43b 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.verify.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <deque>
 

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/empty.verify.cpp b/libcxx/test/std/containers/sequences/forwardlist/empty.verify.cpp
index a8c507535162..ba76f1f88ee7 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/empty.verify.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <forward_list>
 

diff  --git a/libcxx/test/std/containers/sequences/list/list.capacity/empty.verify.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/empty.verify.cpp
index 2b0b33e1f47b..d0e804628ff0 100644
--- a/libcxx/test/std/containers/sequences/list/list.capacity/empty.verify.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.capacity/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <list>
 

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/empty.verify.cpp b/libcxx/test/std/containers/sequences/vector.bool/empty.verify.cpp
index 1b6429b8a573..754f11d22337 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/empty.verify.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <vector>
 

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.verify.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.verify.cpp
index 26a4266a2ce8..626177ee689d 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.verify.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <vector>
 

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/copy.move_only.verify.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/copy.move_only.verify.cpp
index b38f24c3be25..67c91ae5a870 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/copy.move_only.verify.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/copy.move_only.verify.cpp
@@ -9,7 +9,6 @@
 // Make sure that a std::vector containing move-only types can't be copied.
 
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 
 #include <vector>
 

diff  --git a/libcxx/test/std/containers/unord/unord.map/empty.verify.cpp b/libcxx/test/std/containers/unord/unord.map/empty.verify.cpp
index 5f666cb5b65b..1f5f2fd4cf0b 100644
--- a/libcxx/test/std/containers/unord/unord.map/empty.verify.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <unordered_map>
 

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/empty.verify.cpp b/libcxx/test/std/containers/unord/unord.multimap/empty.verify.cpp
index 5bbc294519c7..b0638edeaff7 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/empty.verify.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <unordered_map>
 

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/empty.verify.cpp b/libcxx/test/std/containers/unord/unord.multiset/empty.verify.cpp
index 222909ab2f42..efe778b6f9f4 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/empty.verify.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <unordered_set>
 

diff  --git a/libcxx/test/std/containers/unord/unord.set/empty.verify.cpp b/libcxx/test/std/containers/unord/unord.set/empty.verify.cpp
index d39afb29f6e1..8bf9b0003276 100644
--- a/libcxx/test/std/containers/unord/unord.set/empty.verify.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <unordered_set>
 

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
index 0a58370b70ef..f957b467b92f 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
@@ -12,7 +12,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
index b399dda30bda..91b6558fcec0 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
@@ -12,7 +12,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
index e19ac6890361..733071add771 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
@@ -12,7 +12,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
index cc4a128ab7e9..8914d75b518a 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
@@ -12,7 +12,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03
-// REQUIRES: verify-support
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
index ee4da1caceab..732287549545 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include "filesystem_include.h"
 

diff  --git a/libcxx/test/std/iterators/iterator.container/empty.array.verify.cpp b/libcxx/test/std/iterators/iterator.container/empty.array.verify.cpp
index 48c4a6e92892..4a26125d83f2 100644
--- a/libcxx/test/std/iterators/iterator.container/empty.array.verify.cpp
+++ b/libcxx/test/std/iterators/iterator.container/empty.array.verify.cpp
@@ -13,7 +13,6 @@
 // template <class T, size_t N> constexpr bool empty(const T (&array)[N]) noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <vector>
 #include <iterator>

diff  --git a/libcxx/test/std/iterators/iterator.container/empty.container.verify.cpp b/libcxx/test/std/iterators/iterator.container/empty.container.verify.cpp
index 0e9870962158..d87f986f6886 100644
--- a/libcxx/test/std/iterators/iterator.container/empty.container.verify.cpp
+++ b/libcxx/test/std/iterators/iterator.container/empty.container.verify.cpp
@@ -13,7 +13,6 @@
 // template <class C> constexpr auto empty(const C& c) -> decltype(c.empty());
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <vector>
 #include <iterator>

diff  --git a/libcxx/test/std/iterators/iterator.container/empty.initializer_list.verify.cpp b/libcxx/test/std/iterators/iterator.container/empty.initializer_list.verify.cpp
index 2b00c7ea1c11..54d0ba013e62 100644
--- a/libcxx/test/std/iterators/iterator.container/empty.initializer_list.verify.cpp
+++ b/libcxx/test/std/iterators/iterator.container/empty.initializer_list.verify.cpp
@@ -13,7 +13,6 @@
 // template <class E> constexpr bool empty(initializer_list<E> il) noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <initializer_list>
 #include <iterator>

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp
index 6b1d62d992f5..3651e2e67d84 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
-// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
 // ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp
index 3b1494eef99f..a0fac812ae3b 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
-// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
 // ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp
index 14488f6a9db3..0d884f8bd59f 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
-// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
 // ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp
index 2af50eea8f42..2d2801380f05 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
-// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
 // ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.verify.cpp
index 093eaef858bb..c1ab9043afb4 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.verify.cpp
@@ -12,7 +12,6 @@
 // void* operator new[](std::size_t, void *);
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <new>
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.verify.cpp
index df77c9031f31..1a6b5b24560a 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.verify.cpp
@@ -12,7 +12,6 @@
 // void* operator new(std::size_t, void *);
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <new>
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.verify.cpp
index 4ab5aa703cf4..8c9132659618 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.verify.cpp
@@ -12,7 +12,6 @@
 // void* operator new(std::size_t);
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <new>
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp
index 64706d38fb8c..b6ffb80962cd 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
-// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
 // ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp
index 5d6d168f5a33..f02dd5e0ae31 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
-// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
 // ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.verify.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.verify.cpp
index b5c6d90d0548..10f7c60ef855 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.verify.cpp
@@ -12,7 +12,6 @@
 // void* operator new(std::size_t, std::nothrow_t &);
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <new>
 

diff  --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.verify.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.verify.cpp
index 8845aaf58713..e20b160f537f 100644
--- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.verify.cpp
@@ -12,7 +12,6 @@
 // template <class T> constexpr T* launder(T* p) noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <new>
 #include <cassert>

diff  --git a/libcxx/test/std/re/re.results/re.results.size/empty.verify.cpp b/libcxx/test/std/re/re.results/re.results.size/empty.verify.cpp
index c2449c0b9215..5405aabb5d44 100644
--- a/libcxx/test/std/re/re.results/re.results.size/empty.verify.cpp
+++ b/libcxx/test/std/re/re.results/re.results.size/empty.verify.cpp
@@ -13,7 +13,6 @@
 // bool empty() const;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <regex>
 

diff  --git a/libcxx/test/std/strings/basic.string/string.capacity/empty.verify.cpp b/libcxx/test/std/strings/basic.string/string.capacity/empty.verify.cpp
index 864bb48b666f..2e9f55200613 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/empty.verify.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <string>
 

diff  --git a/libcxx/test/std/strings/string.view/string.view.capacity/empty.verify.cpp b/libcxx/test/std/strings/string.view/string.view.capacity/empty.verify.cpp
index 05e2db6739bd..63de07cafc1c 100644
--- a/libcxx/test/std/strings/string.view/string.view.capacity/empty.verify.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.capacity/empty.verify.cpp
@@ -14,7 +14,6 @@
 // bool empty() const noexcept;
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <string_view>
 

diff  --git a/libcxx/test/std/thread/futures/futures.async/async.verify.cpp b/libcxx/test/std/thread/futures/futures.async/async.verify.cpp
index d26df4468432..1fea53c6f11e 100644
--- a/libcxx/test/std/thread/futures/futures.async/async.verify.cpp
+++ b/libcxx/test/std/thread/futures/futures.async/async.verify.cpp
@@ -8,7 +8,6 @@
 //
 // UNSUPPORTED: libcpp-has-no-threads
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 // <future>
 

diff  --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.verify.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.verify.cpp
index e03c4e667298..02eb8b3872a0 100644
--- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.verify.cpp
+++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 // <memory>
 

diff  --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp
index e62df63d299e..a3e25ef68bc6 100644
--- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp
+++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 // <memory>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
index e6aa2377345f..5002567f619c 100644
--- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
index 49be77d7c101..ac954c1e2f9f 100644
--- a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
index 6737badf8f00..7df5166b4efa 100644
--- a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
index 6530c55b4c38..f651c8f8ba85 100644
--- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
@@ -13,7 +13,6 @@
 
 // UNSUPPORTED: clang-4.0
 // UNSUPPORTED: c++98, c++03, c++11, c++14
-// REQUIRES: verify-support
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.verify.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.verify.cpp
index 9cb150012c63..d710c828f906 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.verify.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.verify.cpp
@@ -16,7 +16,6 @@
 // };
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 #include <memory>
 #include <cstdint>

diff  --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.verify.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.verify.cpp
index f630303ecc94..5d78b6b8f411 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.verify.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.verify.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// REQUIRES: verify-support
 
 // <memory>
 

diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 93090530b738..dc7e25c0cee2 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -130,7 +130,6 @@ def configure(self):
         self.configure_obj_root()
         self.configure_cxx_stdlib_under_test()
         self.configure_cxx_library_root()
-        self.configure_use_clang_verify()
         self.configure_use_thread_safety()
         self.configure_ccache()
         self.configure_compile_flags()
@@ -323,16 +322,6 @@ def configure_cxx_stdlib_under_test(self):
             if self.get_lit_conf('enable_experimental') is None:
                 self.config.enable_experimental = 'true'
 
-    def configure_use_clang_verify(self):
-        '''If set, run clang with -verify on failing tests.'''
-        self.use_clang_verify = self.get_lit_bool('use_clang_verify')
-        if self.use_clang_verify is None:
-            # NOTE: We do not test for the -verify flag directly because
-            #   -verify will always exit with non-zero on an empty file.
-            self.use_clang_verify = self.cxx.isVerifySupported()
-            self.lit_config.note(
-                "inferred use_clang_verify as: %r" % self.use_clang_verify)
-
     def configure_use_thread_safety(self):
         '''If set, run clang with -verify on failing tests.'''
         has_thread_safety = self.cxx.hasCompileFlag('-Werror=thread-safety')

diff  --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py
index 99f10d7f2105..207df2322be9 100644
--- a/libcxx/utils/libcxx/test/format.py
+++ b/libcxx/utils/libcxx/test/format.py
@@ -135,8 +135,6 @@ def _execute(self, test, lit_config):
         substitutions.append(('%{file_dependencies}', ' '.join(data_files)))
 
         # Add other convenience substitutions
-        if self.cxx.isVerifySupported():
-            substitutions.append(('%{verify}', ' '.join(self.cxx.verify_flags)))
         substitutions.append(('%{build}', '%{cxx} -o %t.exe %s %{flags} %{compile_flags} %{link_flags}'))
         substitutions.append(('%{run}', '%{exec} %t.exe'))
 

diff  --git a/libcxx/utils/libcxx/test/newformat.py b/libcxx/utils/libcxx/test/newformat.py
index 8c402bfebc37..a6aaf8ec6314 100644
--- a/libcxx/utils/libcxx/test/newformat.py
+++ b/libcxx/utils/libcxx/test/newformat.py
@@ -13,16 +13,16 @@
 import re
 import subprocess
 
-def _supportsVerify(test):
+def _supportsVerify(config):
     """
-    Determine whether clang-verify is supported for that test.
+    Determine whether clang-verify is supported by the given configuration.
 
-    This is done by checking whether the %{cxx} substitution supports certain
-    compiler flags.
+    This is done by checking whether the %{cxx} substitution in that
+    configuration supports certain compiler flags.
     """
     command = "%{{cxx}} -xc++ {} -Werror -fsyntax-only -Xclang -verify-ignore-unexpected".format(os.devnull)
-    command = lit.TestRunner.applySubstitutions([command], test.config.substitutions,
-                                                recursion_limit=test.config.recursiveExpansionLimit)[0]
+    command = lit.TestRunner.applySubstitutions([command], config.substitutions,
+                                                recursion_limit=config.recursiveExpansionLimit)[0]
     devNull = open(os.devnull, 'w')
     result = subprocess.call(command, shell=True, stdout=devNull, stderr=devNull)
     return result == 0
@@ -56,11 +56,6 @@ def parseScript(test, preamble, fileDependencies):
     substitutions.append(('%{build}', '%{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe'))
     substitutions.append(('%{run}', '%{exec} %t.exe'))
 
-    # Add the %{verify} substitution and the verify-support feature if Clang-verify is supported
-    if _supportsVerify(test):
-        test.config.available_features.add('verify-support')
-        substitutions.append(('%{verify}', '-Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0'))
-
     # Parse the test file, including custom directives
     additionalCompileFlags = []
     fileDependencies = list(fileDependencies)
@@ -125,7 +120,9 @@ class CxxStandardLibraryTest(lit.formats.TestFormat):
 
     FOO.sh.<anything>       - A builtin Lit Shell test
 
-    FOO.verify.cpp          - Compiles with clang-verify
+    FOO.verify.cpp          - Compiles with clang-verify. This type of test is
+                              automatically marked as UNSUPPORTED if the compiler
+                              does not support Clang-verify.
 
     FOO.fail.cpp            - Compiled with clang-verify if clang-verify is
                               supported, and equivalent to a .compile.fail.cpp
@@ -176,19 +173,7 @@ class CxxStandardLibraryTest(lit.formats.TestFormat):
 
     Additional provided substitutions and features
     ==============================================
-    The test format will define the following substitutions for use inside
-    tests:
-
-        %{verify}
-
-            This expands to the set of flags that must be passed to the
-            compiler in order to use Clang-verify, if that is supported.
-
-        verify-support
-
-            This Lit feature will be made available when the compiler supports
-            Clang-verify. This can be used to disable tests that require that
-            feature, such as `.verify.cpp` tests.
+    The test format will define the following substitutions for use inside tests:
 
         %{file_dependencies}
 
@@ -203,18 +188,6 @@ class CxxStandardLibraryTest(lit.formats.TestFormat):
         %{run}
             Equivalent to `%{exec} %t.exe`. This is intended to be used
             in conjunction with the %{build} substitution.
-
-
-    Design notes
-    ============
-    This test format never implicitly disables a type of test. For example,
-    we could be tempted to automatically mark `.verify.cpp` tests as
-    UNSUPPORTED when clang-verify isn't supported by the compiler. However,
-    this sort of logic has been known to cause tests to be ignored in the
-    past, so we favour having tests mark themselves as unsupported explicitly.
-
-    This test format still needs work in the following areas:
-        - It is unknown how well it works on Windows yet.
     """
     def getTestsInDirectory(self, testSuite, pathInSuite, litConfig, localConfig):
         SUPPORTED_SUFFIXES = ['[.]pass[.]cpp$', '[.]pass[.]mm$', '[.]run[.]fail[.]cpp$',
@@ -246,6 +219,8 @@ def _disableWithModules(self, test):
 
     def execute(self, test, litConfig):
         self._checkBaseSubstitutions(test.config.substitutions)
+        VERIFY_FLAGS = '-Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0'
+        supportsVerify = _supportsVerify(test.config)
         filename = test.path_in_suite[-1]
 
         # TODO(ldionne): We currently disable tests that re-define _LIBCPP_ASSERT
@@ -291,8 +266,11 @@ def execute(self, test, litConfig):
             ]
             return self._executeShTest(test, litConfig, steps, fileDependencies=['%t.exe'])
         elif filename.endswith('.verify.cpp'):
+            if not supportsVerify:
+                return lit.Test.Result(lit.Test.UNSUPPORTED,
+                    "Test {} requires support for Clang-verify, which isn't supported by the compiler".format(test.getFullName()))
             steps = [
-                "%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} -fsyntax-only %{verify}"
+                "%dbg(COMPILED WITH) %{{cxx}} %s %{{flags}} %{{compile_flags}} -fsyntax-only {}".format(VERIFY_FLAGS)
             ]
             return self._executeShTest(test, litConfig, steps)
         # Make sure to check these ones last, since they will match other
@@ -307,9 +285,9 @@ def execute(self, test, litConfig):
         # otherwise it's like a .compile.fail.cpp test. This is only provided
         # for backwards compatibility with the test suite.
         elif filename.endswith('.fail.cpp'):
-            if _supportsVerify(test):
+            if supportsVerify:
                 steps = [
-                    "%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} -fsyntax-only %{verify}"
+                    "%dbg(COMPILED WITH) %{{cxx}} %s %{{flags}} %{{compile_flags}} -fsyntax-only {}".format(VERIFY_FLAGS)
                 ]
             else:
                 steps = [


        


More information about the libcxx-commits mailing list