[clang][bytecode][NFC] Only call getSource() when necessary (#125419)
[llvm-project.git] / libcxx / test / std / containers / container.adaptors / flat.map / flat.map.capacity / empty.verify.cpp
blob79b943b790d04d816bf707b6a7dc9f8c3bd4f3e0
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, c++20
11 // <flat_map>
13 // [[nodiscard]] bool empty() const noexcept;
15 #include <flat_map>
17 void f() {
18 std::flat_map<int, int> c;
19 c.empty(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}