================
@@ -236,6 +236,22 @@ static bool IsEligibleForReplacement(Sema &SemaRef, const
CXXRecordDecl *D) {
return !D->hasDeletedDestructor();
}
+static bool IsImplementationDefinedNonRelocatable(Sema &SemaRef,
+ const CXXRecordDecl *D) {
+ // The implementation-defined carveout only exists for polymorphic types.
+ if (!D->isPolymorphic())
+ return false;
+
+ std::vector<PFPField> pfpFields;
+ SemaRef.Context.findPFPFields(SemaRef.Context.getCanonicalTagType(D),
+ CharUnits::Zero(), pfpFields, true);
+ for (PFPField f : pfpFields)
----------------
fmayer wrote:
personal preference, optional:
```cc
any_of(PFPFields, [](const PFPField &f) { return f.isWithinUnion; })
```
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