[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:
@@ -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_view>
|
||||
|
||||
@@ -25,5 +26,5 @@ int main(int, char**)
|
||||
std::string_view c;
|
||||
c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user