@@ -9363,7 +9363,7 @@ struct SpecialMemberDeletionInfo
93639363
93649364 bool shouldDeleteForVariantObjCPtrMember(FieldDecl *FD, QualType FieldType);
93659365
9366- bool shouldDeleteForVariantPtrAuthMember(FieldDecl *FD, QualType FieldType );
9366+ bool shouldDeleteForVariantPtrAuthMember(const FieldDecl *FD);
93679367
93689368 bool visitBase(CXXBaseSpecifier *Base) { return shouldDeleteForBase(Base); }
93699369 bool visitField(FieldDecl *Field) { return shouldDeleteForField(Field); }
@@ -9534,7 +9534,8 @@ bool SpecialMemberDeletionInfo::shouldDeleteForVariantObjCPtrMember(
95349534}
95359535
95369536bool SpecialMemberDeletionInfo::shouldDeleteForVariantPtrAuthMember(
9537- FieldDecl *FD, QualType FieldType) {
9537+ const FieldDecl *FD) {
9538+ QualType FieldType = S.Context.getBaseElementType(FD->getType());
95389539 // Copy/move constructors/assignment operators are deleted if the field has an
95399540 // address-discriminated ptrauth qualifier.
95409541 PointerAuthQualifier Q = FieldType.getPointerAuth();
@@ -9594,7 +9595,7 @@ bool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {
95949595 if (inUnion() && shouldDeleteForVariantObjCPtrMember(FD, FieldType))
95959596 return true;
95969597
9597- if (inUnion() && shouldDeleteForVariantPtrAuthMember(FD, FieldType ))
9598+ if (inUnion() && shouldDeleteForVariantPtrAuthMember(FD))
95989599 return true;
95999600
96009601 if (CSM == CXXSpecialMemberKind::DefaultConstructor) {
@@ -9660,7 +9661,7 @@ bool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {
96609661 if (shouldDeleteForVariantObjCPtrMember(&*UI, UnionFieldType))
96619662 return true;
96629663
9663- if (shouldDeleteForVariantPtrAuthMember(&*UI, UnionFieldType ))
9664+ if (shouldDeleteForVariantPtrAuthMember(&*UI))
96649665 return true;
96659666
96669667 if (!UnionFieldType.isConstQualified())
0 commit comments