This repository was archived by the owner on Mar 30, 2021. It is now read-only.
Set the described template if not set#570
Open
martong wants to merge 1 commit intoEricsson:ctu-clang7from
Open
Set the described template if not set#570martong wants to merge 1 commit intoEricsson:ctu-clang7from
martong wants to merge 1 commit intoEricsson:ctu-clang7from
Conversation
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.
balazske
reviewed
Jan 21, 2019
| 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); |
Collaborator
There was a problem hiding this comment.
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.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).