================ @@ -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) { ---------------- erichkeane wrote:
I don't understand what you mean? `TagDecl` (IIRC?) has a `getQualifier()` to get the appropriate `NestedNameSpecifier`. 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. https://github.com/llvm/llvm-project/pull/65993 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits