================
@@ -2107,8 +2107,9 @@ void ASTDeclMerger::MergeDefinitionData(
auto *Def = DD.Definition;
DD = std::move(MergeDD);
DD.Definition = Def;
- for (auto *D : Def->redecls())
- cast<CXXRecordDecl>(D)->DefinitionData = ⅅ
+ for (auto *R = Reader.getMostRecentExistingDecl(Def); R;
+ R = R->getPreviousDecl())
----------------
hahnjo wrote:
I guess only @alexfh can give us the final confirmation that all issues are
gone, but since this change avoids the iterator it cannot become invalid
anymore and the test added in 5ee6cff90ba5d8e08066eeeef0c27aa0b6f24d2c
continues to pass.
https://github.com/llvm/llvm-project/pull/172559
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits