[all-commits] [llvm/llvm-project] 61c7a9: Commit to a primary definition for a class when we...
Richard Smith via All-commits
all-commits at lists.llvm.org
Tue Jul 25 15:59:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61c7a9140becb19c5b1bc644e54452c6f782f5d5
https://github.com/llvm/llvm-project/commit/61c7a9140becb19c5b1bc644e54452c6f782f5d5
Author: Richard Smith <richard at metafoo.co.uk>
Date: 2023-07-25 (Tue, 25 Jul 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Serialization/ASTReaderDecl.cpp
Log Message:
-----------
Commit to a primary definition for a class when we load its first
member.
Previously, we wouldn't do this if the first member loaded is within a
definition that's added to a class via an update record, which happens
when template instantiation adds a class definition to a declaration
that was imported from an AST file.
This would lead to classes having member functions whose getParent
returned a class declaration that wasn't the primary definition, which
in turn caused the vtable builder to build broken vtables.
I don't yet have a reduced testcase for the wrong-code bug here, because
the setup required to get us into the broken state is very subtle, but
have confirmed that this fixes it.
More information about the All-commits
mailing list