brintos

brintos / llvm-project-archived public Read only

0
0
Text · 702 B · 0a79494 Raw
24 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: c++03, c++11, c++14, c++1710 11// <atomic>12//13// atomic_init14 15#include <atomic>16 17void test() {18  std::atomic<int> a;19  std::atomic_init(&a, 1); // expected-warning {{'atomic_init<int>' is deprecated}}20 21  volatile std::atomic<int> b;22  std::atomic_init(&b, 1); // expected-warning {{'atomic_init<int>' is deprecated}}23}24