[clang] [clang][PAC] Sign and authenticate atomics on __ptrauth types (PR #240090)

JF Bastien via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 12 16:47:36 PST 2026


================
@@ -5671,8 +5685,11 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange,
                   ValArg->getType()->getAs<PointerType>()) {
             AS = PtrTy->getPointeeType().getAddressSpace();
           }
-          Ty = Context.getPointerType(
-              Context.getAddrSpaceQualType(ValType.getUnqualifiedType(), AS));
+          QualType Pointee = ValType.getUnqualifiedType();
+          if (PointerAuth)
+            Pointee = Context.getPointerAuthType(Pointee, PointerAuth);
+          Ty =
+              Context.getPointerType(Context.getAddrSpaceQualType(Pointee, AS));
----------------
jfbastien wrote:

Operand rules: I have a follow up ready for this.

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


More information about the cfe-commits mailing list