Skip to content
This repository was archived by the owner on Mar 30, 2021. It is now read-only.

Conversation

@martong
Copy link

@martong martong commented Jan 9, 2019

During the addition of an injected class type to a record it may happen
that a CXXRecordDecl in the redecl chain does not have a set described
template and this caused an assert in LLDB in macOS (but not in Linux).

During the addition of an injected class type to a record it may happen
that a CXXRecordDecl in the redecl chain does not have a set described
template and this caused an assert in LLDB.
@martong martong requested review from balazske and gamesh411 January 9, 2019 14:39
auto *RI = cast<CXXRecordDecl>(R);
// Existing Decl in the chain might not have the described
// template set, so we set it now.
RI->setDescribedClassTemplate(ToDescribed);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case that DescribedClassTemplate is not set must indicate that it is currently under import. Normally it should be set by a pending (or later) import call. So it should be possible to ignore here that case (if there is no described class template, omit the next 2 lines). The current solution is probably not correct because the RI can have a different DescribedClassTemplate that ToDescribed. (But anyway there should be a pending import call for it that should reset it to the correct value.)

@martong martong added the Experimental We still don't know whether this PR will be needed or not. label Feb 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Experimental We still don't know whether this PR will be needed or not.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants