[Clang][HIP] Deprecate __hip_atomic_* builtins (#189897)
Emit deprecation warnings for all __hip_atomic_* builtins,
pointing users to their __scoped_atomic_* equivalents.
The warning is ignored by default, and can be enabled with
-Whip-deprecated-builtins. It will be turned on by default eventually
after we have cleaned up all ROCm/HIP headers and put a deprecation
schedule in place.
Also provide a fixit when the scope is a compile-time constant and there
is a direct mapping from the HIP builtin to a Clang builtin. The
compare_exchange builtins differ in how they accept the desired value,
so only a warning (without a fixit) is emitted for those.
This makes #185408 almost redundant for HIP, since the HIP scopes
themselves will disappear once the `__hip_*` builtins are gone. OpenCL
is different because the language itself specifies an enum. A simpler
version of #185408 can be used to emit a warning when Sema recognizes
that a non-OpenCL builtin is being passed an OpenCL scope.
Assisted-By: Claude Opus 4.6