-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Fix out of line Concept-comparisons of NestedNameSpecifiers #65993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
52bcb55
Fix out of line Concept-comparisons of NestedNameSpecifiers
erichkeane 7258e88
Make sure we add injected template args from the FTD
erichkeane a5bf5e5
Only add arguments when they participate in depth
erichkeane 2b86194
Move release note to C++ section, move period.
erichkeane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This make sense, I was just looking at the AST: https://godbolt.org/z/P3brjcsMG
and I see that
InnerClass
has:| |-NestedNameSpecifier TypeSpec 'Base<T>'
and I wondering what the prefix is there? Maybe the AST is not telling the whole story?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that one you're seeing there is for the
InnerClass
on line 13, theNestedNameSpecifier
is for 'everything else' outside of that declaration. So in THAT case, the Prefix of that one is nothing, since theBase<T>
is the entirety of the thing.However, that AST doesn't show the
NNS
offunc
on line 22, for some reason we're not dumping that. In THAT case, theNNS
isBase<T>::InnerClass
. At that point, theInnerClass
doesn't have template arguments (since it isn't a template!), but itsPrefix
is just theBase<T>
, which has them (which is why/how this loop works).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not look like there is a simple way of getting like w/
CXXRecordDecl
so some work would be involved.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you mean?
TagDecl
(IIRC?) has agetQualifier()
to get the appropriateNestedNameSpecifier
. I believe our NNS tree is correct the way I've implemented it above, with the exception of the issue I posted about a moment ago.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I just realized I was looking at the code a moment ago
FTD->getTemplatedDecl()->getQualifier()