diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp --- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp +++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp @@ -41,9 +41,9 @@ int main(int, char**) { int v[1] = {1}; - std::random_shuffle(&v[0], &v[1]); // expected-error{{'random_shuffle' is deprecated}} + std::random_shuffle(&v[0], &v[1]); // expected-warning {{'random_shuffle' is deprecated}} gen r; - std::random_shuffle(&v[0], &v[1], r); // expected-error{{'random_shuffle' is deprecated}} + std::random_shuffle(&v[0], &v[1], r); // expected-warning {{'random_shuffle' is deprecated}} return 0; } diff --git a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp --- a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp @@ -30,9 +30,9 @@ int main(int, char**) { - typedef std::auto_ptr AP; // expected-error{{'auto_ptr' is deprecated}} - typedef std::auto_ptr APV; // expected-error{{'auto_ptr' is deprecated}} - typedef std::auto_ptr_ref APR; // expected-error{{'auto_ptr_ref' is deprecated}} + typedef std::auto_ptr AP; // expected-warning {{'auto_ptr' is deprecated}} + typedef std::auto_ptr APV; // expected-warning {{'auto_ptr' is deprecated}} + typedef std::auto_ptr_ref APR; // expected-warning {{'auto_ptr_ref' is deprecated}} return 0; } diff --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.fail.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.fail.cpp --- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.fail.cpp @@ -28,7 +28,7 @@ int x = 0; std::allocator a; - int* p = a.address(x); // expected-error{{'address' is deprecated}} + int* p = a.address(x); // expected-warning {{'address' is deprecated}} (void)p; return 0; 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 @@ -32,7 +32,7 @@ int main(int, char**) { std::allocator a; - a.allocate(3, nullptr); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + a.allocate(3, nullptr); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} return 0; } diff --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.fail.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.fail.cpp --- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.fail.cpp @@ -25,7 +25,7 @@ int main(int, char**) { std::allocator a; - TEST_IGNORE_NODISCARD a.allocate(3, nullptr); // expected-error {{'allocate' is deprecated}} + TEST_IGNORE_NODISCARD a.allocate(3, nullptr); // expected-warning {{'allocate' is deprecated}} return 0; } diff --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.fail.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.fail.cpp --- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.depr_in_cxx17.fail.cpp @@ -42,13 +42,13 @@ int main(int, char**) { - typedef std::allocator::size_type AST; // expected-error{{'size_type' is deprecated}} - typedef std::allocator::difference_type ADT; // expected-error{{'difference_type' is deprecated}} - typedef std::allocator::pointer AP; // expected-error{{'pointer' is deprecated}} - typedef std::allocator::const_pointer ACP; // expected-error{{'const_pointer' is deprecated}} - typedef std::allocator::reference AR; // expected-error{{'reference' is deprecated}} - typedef std::allocator::const_reference ACR; // expected-error{{'const_reference' is deprecated}} - typedef std::allocator::rebind::other ARO; // expected-error{{'rebind' is deprecated}} + typedef std::allocator::size_type AST; // expected-warning {{'size_type' is deprecated}} + typedef std::allocator::difference_type ADT; // expected-warning {{'difference_type' is deprecated}} + typedef std::allocator::pointer AP; // expected-warning {{'pointer' is deprecated}} + typedef std::allocator::const_pointer ACP; // expected-warning {{'const_pointer' is deprecated}} + typedef std::allocator::reference AR; // expected-warning {{'reference' is deprecated}} + typedef std::allocator::const_reference ACR; // expected-warning {{'const_reference' is deprecated}} + typedef std::allocator::rebind::other ARO; // expected-warning {{'rebind' is deprecated}} return 0; } diff --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.fail.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.fail.cpp --- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.depr_in_cxx17.fail.cpp @@ -32,9 +32,9 @@ int main(int, char**) { - typedef std::allocator::pointer AP; // expected-error{{'allocator' is deprecated}} - typedef std::allocator::const_pointer ACP; // expected-error{{'allocator' is deprecated}} - typedef std::allocator::rebind::other ARO; // expected-error{{'allocator' is deprecated}} + typedef std::allocator::pointer AP; // expected-warning {{'allocator' is deprecated}} + typedef std::allocator::const_pointer ACP; // expected-warning {{'allocator' is deprecated}} + typedef std::allocator::rebind::other ARO; // expected-warning {{'allocator' is deprecated}} return 0; } diff --git a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp --- a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp @@ -31,28 +31,28 @@ int main(int, char**) { - typedef std::pointer_to_unary_function PUF; // expected-error{{'pointer_to_unary_function' is deprecated}} - typedef std::pointer_to_binary_function PBF; // expected-error{{'pointer_to_binary_function' is deprecated}} - std::ptr_fun(identity); // expected-error{{'ptr_fun' is deprecated}} - std::ptr_fun(sum); // expected-error{{'ptr_fun' is deprecated}} - - typedef std::mem_fun_t MFT0; // expected-error{{'mem_fun_t' is deprecated}} - typedef std::mem_fun1_t MFT1; // expected-error{{'mem_fun1_t' is deprecated}} - typedef std::const_mem_fun_t CMFT0; // expected-error{{'const_mem_fun_t' is deprecated}} - typedef std::const_mem_fun1_t CMFT1; // expected-error{{'const_mem_fun1_t' is deprecated}} - std::mem_fun(&Foo::zero); // expected-error{{'mem_fun' is deprecated}} - std::mem_fun(&Foo::identity); // expected-error{{'mem_fun' is deprecated}} - std::mem_fun(&Foo::const_zero); // expected-error{{'mem_fun' is deprecated}} - std::mem_fun(&Foo::const_identity); // expected-error{{'mem_fun' is deprecated}} - - typedef std::mem_fun_ref_t MFR0; // expected-error{{'mem_fun_ref_t' is deprecated}} - typedef std::mem_fun1_ref_t MFR1; // expected-error{{'mem_fun1_ref_t' is deprecated}} - typedef std::const_mem_fun_ref_t CMFR0; // expected-error{{'const_mem_fun_ref_t' is deprecated}} - typedef std::const_mem_fun1_ref_t CMFR1; // expected-error{{'const_mem_fun1_ref_t' is deprecated}} - std::mem_fun_ref(&Foo::zero); // expected-error{{'mem_fun_ref' is deprecated}} - std::mem_fun_ref(&Foo::identity); // expected-error{{'mem_fun_ref' is deprecated}} - std::mem_fun_ref(&Foo::const_zero); // expected-error{{'mem_fun_ref' is deprecated}} - std::mem_fun_ref(&Foo::const_identity); // expected-error{{'mem_fun_ref' is deprecated}} + typedef std::pointer_to_unary_function PUF; // expected-warning {{'pointer_to_unary_function' is deprecated}} + typedef std::pointer_to_binary_function PBF; // expected-warning {{'pointer_to_binary_function' is deprecated}} + std::ptr_fun(identity); // expected-warning {{'ptr_fun' is deprecated}} + std::ptr_fun(sum); // expected-warning {{'ptr_fun' is deprecated}} + + typedef std::mem_fun_t MFT0; // expected-warning {{'mem_fun_t' is deprecated}} + typedef std::mem_fun1_t MFT1; // expected-warning {{'mem_fun1_t' is deprecated}} + typedef std::const_mem_fun_t CMFT0; // expected-warning {{'const_mem_fun_t' is deprecated}} + typedef std::const_mem_fun1_t CMFT1; // expected-warning {{'const_mem_fun1_t' is deprecated}} + std::mem_fun(&Foo::zero); // expected-warning {{'mem_fun' is deprecated}} + std::mem_fun(&Foo::identity); // expected-warning {{'mem_fun' is deprecated}} + std::mem_fun(&Foo::const_zero); // expected-warning {{'mem_fun' is deprecated}} + std::mem_fun(&Foo::const_identity); // expected-warning {{'mem_fun' is deprecated}} + + typedef std::mem_fun_ref_t MFR0; // expected-warning {{'mem_fun_ref_t' is deprecated}} + typedef std::mem_fun1_ref_t MFR1; // expected-warning {{'mem_fun1_ref_t' is deprecated}} + typedef std::const_mem_fun_ref_t CMFR0; // expected-warning {{'const_mem_fun_ref_t' is deprecated}} + typedef std::const_mem_fun1_ref_t CMFR1; // expected-warning {{'const_mem_fun1_ref_t' is deprecated}} + std::mem_fun_ref(&Foo::zero); // expected-warning {{'mem_fun_ref' is deprecated}} + std::mem_fun_ref(&Foo::identity); // expected-warning {{'mem_fun_ref' is deprecated}} + std::mem_fun_ref(&Foo::const_zero); // expected-warning {{'mem_fun_ref' is deprecated}} + std::mem_fun_ref(&Foo::const_identity); // expected-warning {{'mem_fun_ref' is deprecated}} 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 @@ -27,8 +27,8 @@ _LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; } int main(int, char**) { - foo(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} - bar(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + foo(); // expected-warning-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + bar(); // expected-warning-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} (void)foo(); // OK. void casts disable the diagnostic. (void)bar(); 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 @@ -27,7 +27,7 @@ _LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; } int main(int, char**) { - foo(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + foo(); // expected-warning-re{{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} bar(); // OK. (void)foo(); // OK. 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 @@ -25,7 +25,7 @@ _LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; } int main(int, char**) { - bar(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + bar(); // expected-warning-re{{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} foo(); // OK. (void)bar(); // OK. 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 @@ -19,7 +19,7 @@ int main(int, char**) { - foo(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + foo(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -38,260 +38,260 @@ int main(int, char**) { int arr[1] = { 1 }; - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::adjacent_find(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::adjacent_find(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::all_of(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::any_of(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::binary_search(std::begin(arr), std::end(arr), 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::binary_search(std::begin(arr), std::end(arr), 1, std::greater()); #if TEST_STD_VER >= 17 - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::clamp(2, 1, 3); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::clamp(2, 1, 3, std::greater()); #endif - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::count_if(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::count(std::begin(arr), std::end(arr), 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::equal_range(std::begin(arr), std::end(arr), 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::equal_range(std::begin(arr), std::end(arr), 1, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::equal(std::begin(arr), std::end(arr), std::begin(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::equal(std::begin(arr), std::end(arr), std::begin(arr), std::greater()); #if TEST_STD_VER >= 14 - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::equal(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::equal(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); #endif - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::find_end(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::find_end(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::find_first_of(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::find_first_of(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::find_if_not(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::find_if(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::find(std::begin(arr), std::end(arr), 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::get_temporary_buffer(1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::includes(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::includes(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_heap_until(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_heap_until(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_heap(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_heap(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_partitioned(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_permutation(std::begin(arr), std::end(arr), std::begin(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_permutation(std::begin(arr), std::end(arr), std::begin(arr), std::greater()); #if TEST_STD_VER >= 14 - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_permutation(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_permutation(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); #endif - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_sorted_until(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_sorted_until(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_sorted(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::is_sorted(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::lexicographical_compare(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::lexicographical_compare(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::lower_bound(std::begin(arr), std::end(arr), 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::lower_bound(std::begin(arr), std::end(arr), 1, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::max_element(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::max_element(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::max(1, 2); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::max(1, 2, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::max({1, 2, 3}); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::max({1, 2, 3}, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::min_element(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::min_element(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::min(1, 2); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::min(1, 2, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::min({1, 2, 3}); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::min({1, 2, 3}, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::minmax_element(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::minmax_element(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::minmax(1, 2); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::minmax(1, 2, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::minmax({1, 2, 3}); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::minmax({1, 2, 3}, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::mismatch(std::begin(arr), std::end(arr), std::begin(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::mismatch(std::begin(arr), std::end(arr), std::begin(arr), std::greater()); #if TEST_STD_VER >= 14 - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::mismatch(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::mismatch(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); #endif - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::none_of(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::remove_if(std::begin(arr), std::end(arr), P()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::remove(std::begin(arr), std::end(arr), 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::search_n(std::begin(arr), std::end(arr), 1, 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::search_n(std::begin(arr), std::end(arr), 1, 1, std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::search(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::search(std::begin(arr), std::end(arr), std::begin(arr), std::end(arr), std::greater()); #if TEST_STD_VER >= 17 - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::search(std::begin(arr), std::end(arr), std::default_searcher(std::begin(arr), std::end(arr))); #endif - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::unique(std::begin(arr), std::end(arr)); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::unique(std::begin(arr), std::end(arr), std::greater()); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::upper_bound(std::begin(arr), std::end(arr), 1); - // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} + // expected-warning-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::upper_bound(std::begin(arr), std::end(arr), 1, std::greater()); return 0; diff --git a/libcxx/test/libcxx/experimental/filesystem/deprecated.fail.cpp b/libcxx/test/libcxx/experimental/filesystem/deprecated.fail.cpp --- a/libcxx/test/libcxx/experimental/filesystem/deprecated.fail.cpp +++ b/libcxx/test/libcxx/experimental/filesystem/deprecated.fail.cpp @@ -13,7 +13,7 @@ #include -using namespace std::experimental::filesystem; // expected-error {{'filesystem' is deprecated: std::experimental::filesystem has now been deprecated in favor of C++17's std::filesystem. Please stop using it and start using std::filesystem. This experimental version will be removed in LLVM 11. You can remove this warning by defining the _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM macro.}} +using namespace std::experimental::filesystem; // expected-warning {{'filesystem' is deprecated: std::experimental::filesystem has now been deprecated in favor of C++17's std::filesystem. Please stop using it and start using std::filesystem. This experimental version will be removed in LLVM 11. You can remove this warning by defining the _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM macro.}} int main(int, char**) { return 0; 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 @@ -33,7 +33,7 @@ int main(int, char**) { std::mutex m; - std::lock_guard{m}; // expected-error{{ignoring temporary created by a constructor declared with 'nodiscard' attribute}} - std::lock_guard{m, std::adopt_lock}; // expected-error{{ignoring temporary created by a constructor declared with 'nodiscard' attribute}} + std::lock_guard{m}; // expected-warning {{ignoring temporary created by a constructor declared with 'nodiscard' attribute}} + std::lock_guard{m, std::adopt_lock}; // expected-warning {{ignoring temporary created by a constructor declared with 'nodiscard' attribute}} return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.fail.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.fail.cpp --- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.fail.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.fail.cpp @@ -20,10 +20,10 @@ int main() { // Note: // We use sizeof() to require it to be a complete type. We don't create a - // variable because otherwise we get two errors for each variable (the - // second error is when the destructor is implicitly called). - (void)sizeof(std::function); // expected-error{{'function' is deprecated}} - (void)sizeof(std::function); // expected-error{{'function' is deprecated}} - (void)sizeof(std::function); // expected-error{{'function' is deprecated}} - (void)sizeof(std::function); // expected-error{{'function' is deprecated}} + // variable because otherwise we get two warnings for each variable (the + // second warning is when the destructor is implicitly called). + (void)sizeof(std::function); // expected-warning {{'function' is deprecated}} + (void)sizeof(std::function); // expected-warning {{'function' is deprecated}} + (void)sizeof(std::function); // expected-warning {{'function' is deprecated}} + (void)sizeof(std::function); // expected-warning {{'function' is deprecated}} } 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::map c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::multimap c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::multiset c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::set c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::priority_queue c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::queue c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::stack c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.creation/to_array.fail.cpp b/libcxx/test/std/containers/sequences/array/array.creation/to_array.fail.cpp --- a/libcxx/test/std/containers/sequences/array/array.creation/to_array.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.creation/to_array.fail.cpp @@ -20,7 +20,6 @@ // expected-error@array:* {{to_array does not accept multidimensional arrays}} // expected-error@array:* {{to_array requires copy constructible elements}} // expected-error@array:* 3 {{cannot initialize}} - // expected-error@array:* 0+ {{suggest braces}} std::to_array(source); // expected-note {{requested here}} } 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 @@ -25,9 +25,9 @@ { std::array c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} std::array c0; - c0.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c0.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::deque c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::forward_list c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::list c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::vector c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::vector c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::unordered_map c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::unordered_multimap c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::unordered_multiset c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::unordered_set c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp @@ -24,7 +24,7 @@ int main(int, char**) { - std::bind1st(test_func(1), 5); // expected-error{{'bind1st' is deprecated}} + std::bind1st(test_func(1), 5); // expected-warning {{'bind1st' is deprecated}} - return 0; + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp @@ -24,7 +24,7 @@ int main(int, char**) { - std::bind2nd(test_func(1), 5); // expected-error{{'bind2nd' is deprecated}} + std::bind2nd(test_func(1), 5); // expected-warning {{'bind2nd' is deprecated}} - return 0; + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp @@ -24,7 +24,7 @@ int main(int, char**) { - typedef std::binder1st B1ST; // expected-error{{'binder1st' is deprecated}} + typedef std::binder1st B1ST; // expected-warning {{'binder1st' is deprecated}} - return 0; + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp @@ -24,7 +24,7 @@ int main(int, char**) { - typedef std::binder2nd B2ND; // expected-error{{'binder2nd' is deprecated}} + typedef std::binder2nd B2ND; // expected-warning {{'binder2nd' is deprecated}} - 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 @@ -24,7 +24,7 @@ int main(int, char**) { fs::path c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { int c[5]; - std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + std::empty(c); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::vector c; - std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + std::empty(c); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::initializer_list c = { 4 }; - std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + std::empty(c); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -22,7 +22,7 @@ int main(int, char**) { char buffer[100]; - ::operator new[](4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + ::operator new[](4, buffer); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -22,7 +22,7 @@ int main(int, char**) { char buffer[100]; - ::operator new(4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + ::operator new(4, buffer); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -21,7 +21,7 @@ int main(int, char**) { - ::operator new(4); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + ::operator new(4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -21,7 +21,7 @@ int main(int, char**) { - ::operator new(4, std::nothrow); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + ::operator new(4, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -23,7 +23,7 @@ int main(int, char**) { int *p = nullptr; - std::launder(p); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + std::launder(p); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} return 0; } diff --git a/libcxx/test/std/numerics/c.math/abs.fail.cpp b/libcxx/test/std/numerics/c.math/abs.fail.cpp --- a/libcxx/test/std/numerics/c.math/abs.fail.cpp +++ b/libcxx/test/std/numerics/c.math/abs.fail.cpp @@ -16,10 +16,10 @@ ui = std::abs(ui); // expected-error {{call to 'abs' is ambiguous}} unsigned char uc = -5; - uc = std::abs(uc); // expected-error {{taking the absolute value of unsigned type 'unsigned char' has no effect}} + uc = std::abs(uc); // expected-warning {{taking the absolute value of unsigned type 'unsigned char' has no effect}} unsigned short us = -5; - us = std::abs(us); // expected-error {{taking the absolute value of unsigned type 'unsigned short' has no effect}} + us = std::abs(us); // expected-warning {{taking the absolute value of unsigned type 'unsigned short' has no effect}} unsigned long ul = -5; ul = std::abs(ul); // expected-error {{call to 'abs' is ambiguous}} 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 @@ -23,7 +23,7 @@ int main(int, char**) { std::match_results c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::string c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -24,7 +24,7 @@ int main(int, char**) { std::string_view c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -33,8 +33,8 @@ int main(int, char**) { - 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}} + std::async( foo, 3); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + std::async(std::launch::async, foo, 3); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -25,7 +25,7 @@ int main(int, char**) { std::scoped_allocator_adaptor> a; - a.allocate(10); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + a.allocate(10); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -25,7 +25,7 @@ int main(int, char**) { std::scoped_allocator_adaptor> a; - a.allocate(10, (const void*)0); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + a.allocate(10, (const void*)0); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp --- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp @@ -26,8 +26,8 @@ }; int main(int, char**) { - std::binary_negate f((Predicate())); // expected-error{{'binary_negate' is deprecated}} + std::binary_negate f((Predicate())); // expected-warning {{'binary_negate' is deprecated}} (void)f; - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp --- a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp @@ -25,7 +25,7 @@ }; int main(int, char**) { - std::not1(Predicate()); // expected-error{{'not1' is deprecated}} + std::not1(Predicate()); // expected-warning {{'not1' is deprecated}} - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp --- a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp @@ -26,7 +26,7 @@ }; int main(int, char**) { - std::not2(Predicate()); // expected-error{{'not2' is deprecated}} + std::not2(Predicate()); // expected-warning {{'not2' is deprecated}} - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp --- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp @@ -25,7 +25,7 @@ }; int main(int, char**) { - std::unary_negate f((Predicate())); // expected-error{{'unary_negate' is deprecated}} + std::unary_negate f((Predicate())); // expected-warning {{'unary_negate' is deprecated}} (void)f; 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 @@ -46,8 +46,8 @@ int main(int, char**) { A a; - 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}} + std::allocator_traits >::allocate(a, 10); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + std::allocator_traits >::allocate(a, 10, nullptr); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 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 @@ -23,7 +23,7 @@ int main(int, char**) { std::allocator a; - a.allocate(3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + a.allocate(3); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp b/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp --- a/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp +++ b/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp @@ -24,7 +24,7 @@ #else // expected-error@+1 {{static_assert failed}} static_assert(!std::is_constant_evaluated(), ""); - // expected-error@-1 0-1 {{'std::is_constant_evaluated' will always evaluate to 'true' in a manifestly constant-evaluated expression}} + // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always evaluate to 'true' in a manifestly constant-evaluated expression}} #endif return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // +// UNSUPPORTED: c++98, c++03 // unique_ptr 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 @@ -238,9 +238,6 @@ test_cxx.flags += ['-fsyntax-only'] if use_verify: test_cxx.useVerify() - test_cxx.useWarnings() - if '-Wuser-defined-warnings' in test_cxx.warning_flags: - test_cxx.warning_flags += ['-Wno-error=user-defined-warnings'] 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)