[libc++] Require the use of clang-verify in .fail.cpp tests that don't fail without it

Some tests do not fail at all when -verify is not supported, unless some
arbitrary warning flag is added to make them fail. We currently used
-Werror=unused-result to make them fail, but doing so makes the test
suite a lot more inscrutable. It seems better to just disable those
tests when -verify is not supported.

Differential Revision: https://reviews.llvm.org/D76256
This commit is contained in:
Louis Dionne committed 2020-03-25 16:48:09 -04:00
1 parent 6d0488f75b
commit aec82f9256
42 files changed
+78 -51

No files matched your search

@@ -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 <string>
@@ -25,5 +26,5 @@ int main(int, char**)
std::string c;
c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
return 0;
return 0;
}