[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Headers / stdatomic.c
blob9afd531a9ed9b72ec5de61bab46f1da06fe1e4c4
1 // RUN: %clang_cc1 -std=c11 -E %s | FileCheck %s
2 // RUN: %clang_cc1 -std=c11 -fms-compatibility -E %s | FileCheck %s
3 // RUN: %clang_cc1 -std=c11 %s -verify
4 // RUN: %clang_cc1 -x c++ -std=c++11 %s -verify
5 // expected-no-diagnostics
6 #include <stdatomic.h>
8 int bool_lock_free = ATOMIC_BOOL_LOCK_FREE;
9 // CHECK: bool_lock_free = {{ *[012] *;}}
11 int char_lock_free = ATOMIC_CHAR_LOCK_FREE;
12 // CHECK: char_lock_free = {{ *[012] *;}}
14 int char16_t_lock_free = ATOMIC_CHAR16_T_LOCK_FREE;
15 // CHECK: char16_t_lock_free = {{ *[012] *;}}
17 int char32_t_lock_free = ATOMIC_CHAR32_T_LOCK_FREE;
18 // CHECK: char32_t_lock_free = {{ *[012] *;}}
20 int wchar_t_lock_free = ATOMIC_WCHAR_T_LOCK_FREE;
21 // CHECK: wchar_t_lock_free = {{ *[012] *;}}
23 int short_lock_free = ATOMIC_SHORT_LOCK_FREE;
24 // CHECK: short_lock_free = {{ *[012] *;}}
26 int int_lock_free = ATOMIC_INT_LOCK_FREE;
27 // CHECK: int_lock_free = {{ *[012] *;}}
29 int long_lock_free = ATOMIC_LONG_LOCK_FREE;
30 // CHECK: long_lock_free = {{ *[012] *;}}
32 int llong_lock_free = ATOMIC_LLONG_LOCK_FREE;
33 // CHECK: llong_lock_free = {{ *[012] *;}}
35 int pointer_lock_free = ATOMIC_POINTER_LOCK_FREE;
36 // CHECK: pointer_lock_free = {{ *[012] *;}}
38 atomic_flag f = ATOMIC_FLAG_INIT;