Undeprecate ATOMIC_FLAG_INIT in C++
authorAaron Ballman <aaron@aaronballman.com>
Tue, 12 Jul 2022 10:48:31 +0000 (06:48 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 12 Jul 2022 10:48:31 +0000 (06:48 -0400)
commit3cfa32a71ecfbc1bf993358e32b916cf3483299f
treeca41844446088bbbb60caa7e7af22fa022826068
parent81af34402d422c7bb5267be2ef73c9a863b8c354
Undeprecate ATOMIC_FLAG_INIT in C++

C++20 deprecated ATOMIC_FLAG_INIT thinking it was deprecated in C when it
wasn't. It is expected to be undeprecated in C++23 as part of LWG3659
(https://wg21.link/LWG3659), which is currently Tentatively Ready.

This handles the case where the user includes <stdatomic.h> in C++ code in a
freestanding compile mode. The corollary libc++ changes are in
1544d1f9fdb115782202d72ad200c3f93b2c4f5a.
clang/docs/ReleaseNotes.rst
clang/lib/Headers/stdatomic.h
clang/test/Headers/stdatomic-deprecations.c