[clang] [Clang][HIP] Deprecate __hip_atomic_* builtins (PR #189897)

Sameer Sahasrabuddhe via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 1 20:48:06 PDT 2026


================
@@ -4565,6 +4565,91 @@ ExprResult Sema::AtomicOpsOverloaded(ExprResult TheCallResult,
                          Op);
 }
 
+/// Deprecate __hip_atomic_* builtins in favour of __scoped_atomic_*
+/// equivalents. Provide a fixit when the scope is a compile-time constant and
----------------
ssahasra wrote:

That's possible if there is a way to generate fixits in the preprocessor. If not, we can still do this by first moving `__HIP` macros to an enum in the HIP headers. That's a much easier change than what I previously tried with the Clang builtin scopes.

https://github.com/llvm/llvm-project/pull/189897


More information about the cfe-commits mailing list