Repository navigation
fix(templates): avoid reusing specialization without rescan info in C… - #390
Open
jakub-labenski wants to merge 1 commit into
Open
jakub-labenski wants to merge 1 commit into
jakub-labenski wants to merge 1 commit into
Conversation
…TAD [] compare_expressions checked, under CC_EXACT_EQUIVALENCE, that both nodes either have or lack rescan info. That check only ran when the type comparison was done, and the type comparison is skipped for variable references. As a result, a specialization such as P<b> (b a dependent static data member) created by a member declaration, with no rescan info, could be reused for the same specialization in a constructor parameter type. Then, building the implicit deduction guide for class template argument deduction failed with the internal error "missing default rescan info". Move the rescan info check out of the type comparison block so it applies to all equivalent nodes. Add regression test regressions/ctad-dependent-member-template-arg-reuse.sft.cpp and a Changes entry.
Collaborator
|
AcknowlEDG review results updated for
|
Collaborator
|
AcknowlEDG review results updated for
CI success. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…TAD []
Discussion #336
compare_expressions checked, under CC_EXACT_EQUIVALENCE, that both nodes either have or lack rescan info. That check only ran when the type comparison was done, and the type comparison is skipped for variable references.
As a result, a specialization such as P<b> (b a dependent static data member) created by a member declaration, with no rescan info, could be reused for the same specialization in a constructor parameter type. Then, building the implicit deduction guide for class template argument deduction failed with the internal error "missing default rescan info".
Move the rescan info check out of the type comparison block so it applies to all equivalent nodes.
Add regression test
regressions/ctad-dependent-member-template-arg-reuse.sft.cpp and a Changes entry.
Summary by CodeRabbit