diff options
Diffstat (limited to 'libcxx/test/libcxx/diagnostics/memory.nodiscard.verify.cpp')
| -rw-r--r-- | libcxx/test/libcxx/diagnostics/memory.nodiscard.verify.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libcxx/test/libcxx/diagnostics/memory.nodiscard.verify.cpp b/libcxx/test/libcxx/diagnostics/memory.nodiscard.verify.cpp index 210d269c9fa2..646569e3d573 100644 --- a/libcxx/test/libcxx/diagnostics/memory.nodiscard.verify.cpp +++ b/libcxx/test/libcxx/diagnostics/memory.nodiscard.verify.cpp @@ -39,15 +39,3 @@ void test_allocator() { allocator.allocate_at_least(1); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} #endif } - -void test_const_allocator() { - std::allocator<const int> allocator; - allocator.allocate(1); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} - -#if TEST_STD_VER <= 17 - allocator.allocate(1, nullptr); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} -#endif -#if TEST_STD_VER >= 23 - allocator.allocate_at_least(1); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} -#endif -} |
