[clang] [clang] Propagate definition data to all redecls (PR #170090)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 1 01:53:54 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 = ⅅ
----------------
ChuanqiXu9 wrote:
If you like, I hope you can introduce `noload_redecls()` here. But I don't block this.
https://github.com/llvm/llvm-project/pull/170090
More information about the cfe-commits
mailing list