aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-09-05 05:38:54 +0000
committerAnders Carlsson <andersca@mac.com>2009-09-05 05:38:54 +0000
commit6bc107b49862418bf3f64f74f17e472b4c13aa71 (patch)
tree80d059f93e89cf4e690d5465fc7755f1f68e6c3c /lib/Sema/SemaTemplateInstantiate.cpp
parent25cae7f4b1155b1a6ca959ea5143ea39eae656cd (diff)
Report errors for member functions correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-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;
}