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 // <atomic>
10
11 // Make sure that `std::atomic` doesn't work with `_BitInt`. The intent is to
12 // disable them for now until their behavior can be designed better later.
13 // See https://reviews.llvm.org/D84049 for details.
14
15 // UNSUPPORTED: apple-clang-14
16
17 // UNSUPPORTED: c++03
18
19 #include <atomic>
20
f()21 void f() {
22 // expected-error@*:*1 {{_Atomic cannot be applied to integer type '_BitInt(32)'}}
23 std::atomic<_BitInt(32)> x(42);
24 }
25