File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
test/libcxx/atomics/stdatomic.h.syn Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -231,11 +231,12 @@ using std::atomic_store_explicit _LIBCPP_USING_IF_EXISTS;
231231using std::atomic_signal_fence _LIBCPP_USING_IF_EXISTS;
232232using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS;
233233
234- # else
234+ # elif defined(_LIBCPP_COMPILER_CLANG_BASED)
235235
236236// Before C++23, we include the next <stdatomic.h> on the path to avoid hijacking
237- // the header, since Clang and some platforms have been providing this header for
238- // a long time and users rely on it.
237+ // the header. We do this because Clang has historically shipped a <stdatomic.h>
238+ // header that would be available in all Standard modes, and we don't want to
239+ // break that use case.
239240# if __has_include_next(<stdatomic.h>)
240241# include_next <stdatomic.h>
241242# endif
Original file line number Diff line number Diff line change 1717
1818// REQUIRES: c++03 || c++11 || c++14 || c++17 || c++20
1919
20+ // On GCC, the compiler-provided <stdatomic.h> is not C++ friendly, so including <stdatomic.h>
21+ // doesn't work at all if we don't use the <stdatomic.h> provided by libc++ in C++23 and above.
22+ // XFAIL: (c++11 || c++14 || c++17 || c++20) && gcc
23+
2024#include < atomic>
2125#include < stdatomic.h>
2226#include < type_traits>
You can’t perform that action at this time.
0 commit comments