diff --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.fail.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.fail.cpp --- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.fail.cpp @@ -8,6 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support // @@ -33,5 +34,5 @@ std::allocator a; a.allocate(3, nullptr); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp --- a/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp @@ -16,6 +16,8 @@ // GCC 7 is the first version to introduce [[nodiscard]] // UNSUPPORTED: gcc-5, gcc-6 +// REQUIRES: verify-support + // MODULES_DEFINES: _LIBCPP_ENABLE_NODISCARD #define _LIBCPP_ENABLE_NODISCARD diff --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp --- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // 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.fail.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp --- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // 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.fail.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp --- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp @@ -11,6 +11,7 @@ // #define _LIBCPP_NODISCARD_AFTER_CXX17 [[nodiscard]] // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// REQUIRES: verify-support #include <__config> @@ -20,5 +21,5 @@ { foo(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp --- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp @@ -8,9 +8,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03 - -// GCC versions prior to 7.0 don't provide the required [[nodiscard]] attribute. -// UNSUPPORTED: gcc-5, gcc-6 +// 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/thread/thread.lock/thread.lock.guard/nodiscard.fail.cpp b/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.fail.cpp --- a/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.fail.cpp +++ b/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.fail.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // 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/std/containers/associative/map/map.access/empty.fail.cpp b/libcxx/test/std/containers/associative/map/map.access/empty.fail.cpp --- a/libcxx/test/std/containers/associative/map/map.access/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::map c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/empty.fail.cpp b/libcxx/test/std/containers/associative/multimap/empty.fail.cpp --- a/libcxx/test/std/containers/associative/multimap/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::multimap c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/empty.fail.cpp b/libcxx/test/std/containers/associative/multiset/empty.fail.cpp --- a/libcxx/test/std/containers/associative/multiset/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/multiset/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::multiset c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/associative/set/empty.fail.cpp b/libcxx/test/std/containers/associative/set/empty.fail.cpp --- a/libcxx/test/std/containers/associative/set/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/set/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::set c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::priority_queue c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::queue c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::stack c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/empty.fail.cpp b/libcxx/test/std/containers/sequences/array/empty.fail.cpp --- a/libcxx/test/std/containers/sequences/array/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -28,5 +29,5 @@ std::array c0; c0.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::deque c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp b/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::forward_list c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp --- a/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::list c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp b/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp --- a/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::vector c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::vector c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp --- a/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::unordered_map c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::unordered_multimap c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::unordered_multiset c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp --- a/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::unordered_set c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include "filesystem_include.h" @@ -25,5 +26,5 @@ fs::path c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp b/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp --- a/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp @@ -14,6 +14,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include #include @@ -25,5 +26,5 @@ int c[5]; std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp b/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp --- a/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp @@ -14,6 +14,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include #include @@ -25,5 +26,5 @@ std::vector c; std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp b/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp --- a/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp @@ -14,6 +14,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include #include @@ -25,5 +26,5 @@ std::initializer_list c = { 4 }; std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -23,5 +24,5 @@ char buffer[100]; ::operator new[](4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -23,5 +24,5 @@ char buffer[100]; ::operator new(4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -22,5 +23,5 @@ { ::operator new(4); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -22,5 +23,5 @@ { ::operator new(4, std::nothrow); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp --- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include #include @@ -24,5 +25,5 @@ int *p = nullptr; std::launder(p); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp b/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp --- a/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp +++ b/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp @@ -14,6 +14,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -24,5 +25,5 @@ std::match_results c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp b/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp --- a/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::string c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp b/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp --- a/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp +++ b/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include @@ -25,5 +26,5 @@ std::string_view c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.async/async.fail.cpp b/libcxx/test/std/thread/futures/futures.async/async.fail.cpp --- a/libcxx/test/std/thread/futures/futures.async/async.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.async/async.fail.cpp @@ -9,6 +9,7 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support // @@ -35,5 +36,5 @@ std::async( foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} std::async(std::launch::async, foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp @@ -8,6 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support // @@ -26,5 +27,5 @@ std::scoped_allocator_adaptor> a; a.allocate(10); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp @@ -8,6 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support // @@ -26,5 +27,5 @@ std::scoped_allocator_adaptor> a; a.allocate(10, (const void*)0); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp @@ -17,6 +17,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support #include #include @@ -48,5 +49,5 @@ std::allocator_traits >::allocate(a, 10); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} std::allocator_traits >::allocate(a, 10, nullptr); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp @@ -8,6 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +// REQUIRES: verify-support // @@ -24,5 +25,5 @@ std::allocator a; a.allocate(3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - return 0; + return 0; } diff --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py --- a/libcxx/utils/libcxx/test/format.py +++ b/libcxx/utils/libcxx/test/format.py @@ -241,18 +241,6 @@ test_cxx.useWarnings() if '-Wuser-defined-warnings' in test_cxx.warning_flags: test_cxx.warning_flags += ['-Wno-error=user-defined-warnings'] - else: - # We still need to enable certain warnings on .fail.cpp test when - # -verify isn't enabled. Such as -Werror=unused-result. However, - # we don't want it enabled too liberally, which might incorrectly - # allow unrelated failure tests to 'pass'. - # - # Therefore, we check if the test was expected to fail because of - # nodiscard before enabling it - test_str_list = [b'ignoring return value', b'nodiscard', - b'NODISCARD'] - if any(test_str in contents for test_str in test_str_list): - test_cxx.flags += ['-Werror=unused-result'] cmd, out, err, rc = test_cxx.compile(source_path, out=os.devnull) check_rc = lambda rc: rc == 0 if use_verify else rc != 0 report = libcxx.util.makeReport(cmd, out, err, rc)