39 lines · c
1// RUN: %clang_cc1 -std=c11 -E %s | FileCheck %s2// RUN: %clang_cc1 -std=c11 -fms-compatibility -E %s | FileCheck %s3// RUN: %clang_cc1 -std=c11 %s -verify4// RUN: %clang_cc1 -x c++ -std=c++11 %s -verify5// expected-no-diagnostics6#include <stdatomic.h>7 8int bool_lock_free = ATOMIC_BOOL_LOCK_FREE;9// CHECK: bool_lock_free = {{ *[012] *;}}10 11int char_lock_free = ATOMIC_CHAR_LOCK_FREE;12// CHECK: char_lock_free = {{ *[012] *;}}13 14int char16_t_lock_free = ATOMIC_CHAR16_T_LOCK_FREE;15// CHECK: char16_t_lock_free = {{ *[012] *;}}16 17int char32_t_lock_free = ATOMIC_CHAR32_T_LOCK_FREE;18// CHECK: char32_t_lock_free = {{ *[012] *;}}19 20int wchar_t_lock_free = ATOMIC_WCHAR_T_LOCK_FREE;21// CHECK: wchar_t_lock_free = {{ *[012] *;}}22 23int short_lock_free = ATOMIC_SHORT_LOCK_FREE;24// CHECK: short_lock_free = {{ *[012] *;}}25 26int int_lock_free = ATOMIC_INT_LOCK_FREE;27// CHECK: int_lock_free = {{ *[012] *;}}28 29int long_lock_free = ATOMIC_LONG_LOCK_FREE;30// CHECK: long_lock_free = {{ *[012] *;}}31 32int llong_lock_free = ATOMIC_LLONG_LOCK_FREE;33// CHECK: llong_lock_free = {{ *[012] *;}}34 35int pointer_lock_free = ATOMIC_POINTER_LOCK_FREE;36// CHECK: pointer_lock_free = {{ *[012] *;}}37 38atomic_flag f = ATOMIC_FLAG_INIT;39