Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / utilities / memory / default.allocator / allocator.members / allocate.verify.cpp
blobb2b6f51e98245bfe531054899d52462cf0b1728c
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // <memory>
13 // allocator:
14 // T* allocate(size_t n);
16 #include <memory>
18 void f() {
19 std::allocator<int> a;
20 a.allocate(3); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}