[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #121943)

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 7 07:06:33 PST 2025


================
@@ -1977,16 +1977,16 @@ def AtomicNandFetch : AtomicBuiltin {
   let Prototype = "void(...)";
 }
 
-def AtomicTestAndSet : Builtin {
+def AtomicTestAndSet : AtomicBuiltin {
   let Spellings = ["__atomic_test_and_set"];
-  let Attributes = [NoThrow];
-  let Prototype = "bool(void volatile*, int)";
+  let Attributes = [NoThrow, CustomTypeChecking];
+  let Prototype = "void(...)";
----------------
jyknight wrote:

Maybe doesn't matter, but shouldn't this be `bool(...)`?

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


More information about the cfe-commits mailing list