[clang] [Clang] Add __scoped_atomic_uinc_wrap and __scoped_atomic_udec_wrap builtins (PR #168666)

Wenju He via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 25 03:42:39 PST 2025


================
@@ -2290,6 +2290,18 @@ def ScopedAtomicMaxFetch : AtomicBuiltin {
   let Prototype = "void(...)";
 }
 
+def ScopedAtomicUIncWrap : AtomicBuiltin {
+  let Spellings = ["__scoped_atomic_uinc_wrap"];
+  let Attributes = [CustomTypeChecking];
+  let Prototype = "void(...)";
----------------
wenju-he wrote:

> Weird to me we'd do an open prototype here/custom type checking. Why can't we fit this into the type system?

Current clang builtin handling doesn't support the same builtin name but with templated type.
I'll try to follow up. Is it ok to keep this PR as it like other atomic builtins?

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


More information about the cfe-commits mailing list