brintos

brintos / llvm-project-archived public Read only

0
0
Text · 687 B · 4ae2221 Raw
25 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: no-threads10 11// <mutex>12 13// GCC doesn't have thread safety attributes14// UNSUPPORTED: gcc15 16// ADDITIONAL_COMPILE_FLAGS: -Wthread-safety17 18// XFAIL: FROZEN-CXX03-HEADERS-FIXME19 20#include <mutex>21 22std::mutex m;23 24void f() { m.lock(); } // expected-warning {{mutex 'm' is still held at the end of function}}25