-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Changes from 1 commit
52bcb55
7258e88
a5bf5e5
2b86194
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,14 +231,18 @@ Response HandleFunctionTemplateDecl(const FunctionTemplateDecl *FTD, | |
MultiLevelTemplateArgumentList &Result) { | ||
if (!isa<ClassTemplateSpecializationDecl>(FTD->getDeclContext())) { | ||
NestedNameSpecifier *NNS = FTD->getTemplatedDecl()->getQualifier(); | ||
const Type *Ty; | ||
const TemplateSpecializationType *TSTy; | ||
if (NNS && (Ty = NNS->getAsType()) && | ||
(TSTy = Ty->getAs<TemplateSpecializationType>())) | ||
Result.addOuterTemplateArguments(const_cast<FunctionTemplateDecl *>(FTD), | ||
TSTy->template_arguments(), | ||
/*Final=*/false); | ||
|
||
while (const Type *Ty = NNS ? NNS->getAsType() : nullptr) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | |-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 commentThe reason will be displayed to describe this comment to others. Learn more. So that one you're seeing there is for the However, that AST doesn't show the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand what you mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
if (const auto *TSTy = Ty->getAs<TemplateSpecializationType>()) | ||
Result.addOuterTemplateArguments( | ||
const_cast<FunctionTemplateDecl *>(FTD), TSTy->template_arguments(), | ||
/*Final=*/false); | ||
|
||
NNS = NNS->getPrefix(); | ||
} | ||
} | ||
|
||
return Response::ChangeDecl(FTD->getLexicalDeclContext()); | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.