================
@@ -923,6 +932,11 @@ namespace {
       if (PointerAuthQualifier Q = F->getType().getPointerAuth();
           Q && Q.isAddressDiscriminated())
         return false;
+      // Non-trivially-copyable fields with pointer field protection need to be
+      // copied one by one.
+      if (!CGF.getContext().arePFPFieldsTriviallyCopyable(ClassDecl) &&
----------------
ojhunt wrote:

Maybe we should just have a ASTContext::isFieldAddressDependent(FieldDecl*)? it 
can wrap hasAddressDiscriminatedPointerAuth() (or whatever I named it) and the 
PFP check? Wouldn't depend on sharing data between the two, it can just do both 
checks sequentially, as I just realized while typing this comment that I'd been 
brainfarting may way through with PFP being decl based not type :D

https://github.com/llvm/llvm-project/pull/172119
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to