aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index dcf2876..419f3e1 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -3822,14 +3822,19 @@ QualType Sema::CheckTemplateIdType(ElaboratedTypeKeyword Keyword,
AliasTemplate->getTemplateParameters()->getDepth());
LocalInstantiationScope Scope(*this);
- InstantiatingTemplate Inst(
- *this, /*PointOfInstantiation=*/TemplateLoc,
- /*Entity=*/AliasTemplate,
- /*TemplateArgs=*/TemplateArgLists.getInnermost());
// Diagnose uses of this alias.
(void)DiagnoseUseOfDecl(AliasTemplate, TemplateLoc);
+ // FIXME: The TemplateArgs passed here are not used for the context note,
+ // nor they should, because this note will be pointing to the specialization
+ // anyway. These arguments are needed for a hack for instantiating lambdas
+ // in the pattern of the alias. In getTemplateInstantiationArgs, these
+ // arguments will be used for collating the template arguments needed to
+ // instantiate the lambda.
+ InstantiatingTemplate Inst(*this, /*PointOfInstantiation=*/TemplateLoc,
+ /*Entity=*/AliasTemplate,
+ /*TemplateArgs=*/CTAI.SugaredConverted);
if (Inst.isInvalid())
return QualType();