Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang / test / C / C11 / n1482.c
blob493c7d0a18f109d2d204bd7ee0f8b589a98eebeb
1 // RUN: %clang_cc1 -verify -ffreestanding -std=c11 %s
2 // expected-no-diagnostics
4 /* WG14 N1482: Clang 4
5 * Explicit initializers for atomics
7 * NB: We can only test the compile time behavior from the paper, not the
8 * runtime behavior.
9 */
11 #include <stdatomic.h>
13 #ifndef ATOMIC_BOOL_LOCK_FREE
14 #error "Missing ATOMIC_BOOL_LOCK_FREE"
15 #endif
17 #ifndef ATOMIC_CHAR_LOCK_FREE
18 #error "Missing ATOMIC_CHAR_LOCK_FREE"
19 #endif
21 #ifndef ATOMIC_CHAR16_T_LOCK_FREE
22 #error "Missing ATOMIC_CHAR16_T_LOCK_FREE"
23 #endif
25 #ifndef ATOMIC_CHAR32_T_LOCK_FREE
26 #error "Missing ATOMIC_CHAR32_T_LOCK_FREE"
27 #endif
29 #ifndef ATOMIC_WCHAR_T_LOCK_FREE
30 #error "Missing ATOMIC_WCHAR_T_LOCK_FREE"
31 #endif
33 #ifndef ATOMIC_SHORT_LOCK_FREE
34 #error "Missing ATOMIC_SHORT_LOCK_FREE"
35 #endif
37 #ifndef ATOMIC_INT_LOCK_FREE
38 #error "Missing ATOMIC_INT_LOCK_FREE"
39 #endif
41 #ifndef ATOMIC_LONG_LOCK_FREE
42 #error "Missing ATOMIC_LONG_LOCK_FREE"
43 #endif
45 #ifndef ATOMIC_LLONG_LOCK_FREE
46 #error "Missing ATOMIC_LLONG_LOCK_FREE"
47 #endif
49 #ifndef ATOMIC_POINTER_LOCK_FREE
50 #error "Missing ATOMIC_POINTER_LOCK_FREE"
51 #endif
53 #ifndef ATOMIC_VAR_INIT
54 #error "Missing ATOMIC_VAR_INIT"
55 #endif
57 #ifndef atomic_init
58 #error "Missing atomic_init"
59 #endif