[clang] [clang] Propagate definition data to all redecls (PR #170090)

Jonas Hahnfeld via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 1 02:12:26 PST 2025


================
@@ -2107,8 +2107,8 @@ void ASTDeclMerger::MergeDefinitionData(
     auto *Def = DD.Definition;
     DD = std::move(MergeDD);
     DD.Definition = Def;
-    while ((Def = Def->getPreviousDecl()))
-      cast<CXXRecordDecl>(Def)->DefinitionData = ⅅ
+    for (auto *D : Def->redecls())
+      cast<CXXRecordDecl>(D)->DefinitionData = ⅅ
----------------
hahnjo wrote:

Not really, I consider this a fix of the code introduced in #157019 and I would really like to make progress with #133057...

https://github.com/llvm/llvm-project/pull/170090


More information about the cfe-commits mailing list