[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 30 12:39:53 PDT 2021
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:3328-3331
// If there's no definition yet, then DC's definition is added by an update
// record, but we've not yet loaded that update record. In this case, we
// commit to DC being the canonical definition now, and will fix this when
// we load the update record.
----------------
I believe there's no need to have logic matching this case in C because the only way that a class definition can be added by an update record is due to template instantiation. So we can use the simpler logic below for C.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106994/new/
https://reviews.llvm.org/D106994
More information about the cfe-commits
mailing list