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: c++03 |
16 | |
17 | #include <atomic> |
18 | |
19 | void f() { |
20 | // expected-error@*:*1 {{_Atomic cannot be applied to integer type '_BitInt(32)'}} |
21 | std::atomic<_BitInt(32)> x(42); |
22 | } |
23 | |