[clang] [Clang][Parser] Build up QualifiedTemplateName for typo correction (PR #108148)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 11 07:12:17 PDT 2024
================
@@ -3567,7 +3567,10 @@ bool Sema::resolveAssumedTemplateNameAsType(Scope *S, TemplateName &Name,
if (Corrected && Corrected.getFoundDecl()) {
diagnoseTypo(Corrected, PDiag(diag::err_no_template_suggest)
<< ATN->getDeclName());
- Name = TemplateName(Corrected.getCorrectionDeclAs<TemplateDecl>());
+ Name = Context.getQualifiedTemplateName(
+ /*NNS=*/nullptr, /*TemplateKeyword=*/false,
+ TemplateName(
+ TemplateName(Corrected.getCorrectionDeclAs<TemplateDecl>())));
----------------
cor3ntin wrote:
Why do we need `TemplateName(TemplateName(` ?
https://github.com/llvm/llvm-project/pull/108148
More information about the cfe-commits
mailing list