================
@@ -5558,6 +5558,38 @@ QualType::DestructionKind
QualType::isDestructedTypeImpl(QualType type) {
return DK_none;
}
+static bool
+requiresBuiltinLaunderImpl(const ASTContext &Context, QualType Ty,
+ llvm::SmallPtrSetImpl<const Decl *> &Seen) {
+ if (const auto *Arr = Context.getAsArrayType(Ty))
+ Ty = Context.getBaseElementType(Arr);
+
+ const auto *Record = Ty->getAsCXXRecordDecl();
+ if (!Record)
+ return false;
+
+ // We've already checked this type, or are in the process of checking it.
+ if (!Seen.insert(Record).second)
+ return false;
+
+ assert(Record->hasDefinition() &&
+ "Incomplete types should already be diagnosed");
+
+ if (Record->isDynamicClass())
+ return true;
+
+ for (FieldDecl *F : Record->fields()) {
----------------
AaronBallman wrote:
Do we have to look at base classes and their fields too?
https://github.com/llvm/llvm-project/pull/197252
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits