[clang] Fix out of line Concept-comparisons of NestedNameSpecifiers (PR #65993)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 11 12:34:54 PDT 2023
================
@@ -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) {
----------------
shafik wrote:
This make sense, I was just looking at the AST: https://godbolt.org/z/P3brjcsMG
and I see that `InnerClass` has:
```console
| |-NestedNameSpecifier TypeSpec 'Base<T>'
```
and I wondering what the prefix is there? Maybe the AST is not telling the whole story?
https://github.com/llvm/llvm-project/pull/65993
More information about the cfe-commits
mailing list