aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index b48708305a..97b58adb06 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -293,7 +293,6 @@ void Sema::PrintInstantiationStack() {
case ActiveTemplateInstantiation::DefaultFunctionArgumentInstantiation: {
ParmVarDecl *Param = cast<ParmVarDecl>((Decl *)Active->Entity);
FunctionDecl *FD = cast<FunctionDecl>(Param->getDeclContext());
- TemplateDecl *Template = FD->getPrimaryTemplate();
std::string TemplateArgsStr
= TemplateSpecializationType::PrintTemplateArgumentList(
@@ -302,7 +301,7 @@ void Sema::PrintInstantiationStack() {
Context.PrintingPolicy);
Diags.Report(FullSourceLoc(Active->PointOfInstantiation, SourceMgr),
diag::note_default_function_arg_instantiation_here)
- << (Template->getNameAsString() + TemplateArgsStr)
+ << (FD->getNameAsString() + TemplateArgsStr)
<< Active->InstantiationRange;
break;
}