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 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 
11 // <atomic>
12 //
13 // atomic_init
14 
15 #include <atomic>
16 
test()17 void 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