summaryrefslogtreecommitdiffstats
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, 8 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index ea0357a3359..ab5f545181b 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -3329,7 +3329,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef,
// on the previously-computed template arguments.
if (ArgType->getType()->isDependentType()) {
Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc,
- Template, Converted,
+ Param, Template, Converted,
SourceRange(TemplateLoc, RAngleLoc));
if (Inst.isInvalid())
return nullptr;
@@ -3381,7 +3381,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef,
NonTypeTemplateParmDecl *Param,
SmallVectorImpl<TemplateArgument> &Converted) {
Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc,
- Template, Converted,
+ Param, Template, Converted,
SourceRange(TemplateLoc, RAngleLoc));
if (Inst.isInvalid())
return ExprError();
@@ -3432,8 +3432,9 @@ SubstDefaultTemplateArgument(Sema &SemaRef,
TemplateTemplateParmDecl *Param,
SmallVectorImpl<TemplateArgument> &Converted,
NestedNameSpecifierLoc &QualifierLoc) {
- Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc, Template, Converted,
- SourceRange(TemplateLoc, RAngleLoc));
+ Sema::InstantiatingTemplate Inst(
+ SemaRef, TemplateLoc, TemplateParameter(Param), Template, Converted,
+ SourceRange(TemplateLoc, RAngleLoc));
if (Inst.isInvalid())
return TemplateName();
@@ -4054,7 +4055,9 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
}
// Introduce an instantiation record that describes where we are using
- // the default template argument.
+ // the default template argument. We're not actually instantiating a
+ // template here, we just create this object to put a note into the
+ // context stack.
InstantiatingTemplate Inst(*this, RAngleLoc, Template, *Param, Converted,
SourceRange(TemplateLoc, RAngleLoc));
if (Inst.isInvalid())
OpenPOWER on IntegriCloud