================
@@ -6496,6 +6496,17 @@ static bool canPerformArrayCopy(const InitializedEntity
&Entity) {
return false;
}
+static const FieldDecl *getConstField(const RecordDecl *RD) {
+ for (const FieldDecl *FD : RD->fields()) {
+ QualType QT = FD->getType();
+ if (QT.isConstQualified())
+ return FD;
+ if (const auto *RD = QT->getAsRecordDecl())
+ return getConstField(RD);
----------------
shafik wrote:
Should we check the return value and if it is `nullptr` continue the outer for?
https://github.com/llvm/llvm-project/pull/137166
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits