diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-02 18:46:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-02 18:46:51 +0000 |
commit | 1d752d7d68359fd8f7701585d4658aa70e129261 (patch) | |
tree | 0f904fc734272d7cfc68baedef831bf1bdbdf1ea /lib/Sema/SemaTemplate.cpp | |
parent | b71d821d64af88749fc9860fd43a5164d8d819c8 (diff) |
Kill off the TreeTransform::TransformTemplateName overload that has
poor source-location information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 90b0d7e29b..49f9a1de1e 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -2105,7 +2105,6 @@ bool Sema::CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, /// /// \param Converted the list of template arguments provided for template /// parameters that precede \p Param in the template parameter list. -/// /// \returns the substituted template argument, or NULL if an error occurred. static TypeSourceInfo * SubstDefaultTemplateArgument(Sema &SemaRef, @@ -2202,8 +2201,8 @@ SubstDefaultTemplateArgument(Sema &SemaRef, /// \param Converted the list of template arguments provided for template /// parameters that precede \p Param in the template parameter list. /// -/// \param QualifierLoc The nested-name-specifier, with source-location -/// information, which will also be instantiated and updated. +/// \param QualifierLoc Will be set to the nested-name-specifier (with +/// source-location information) that precedes the template name. /// /// \returns the substituted template argument, or NULL if an error occurred. static TemplateName @@ -2226,6 +2225,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef, SourceRange(TemplateLoc, RAngleLoc)); // Substitute into the nested-name-specifier first, + QualifierLoc = Param->getDefaultArgument().getTemplateQualifierLoc(); if (QualifierLoc) { QualifierLoc = SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc, AllTemplateArgs); @@ -2233,7 +2233,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef, return TemplateName(); } - return SemaRef.SubstTemplateName( + return SemaRef.SubstTemplateName(QualifierLoc, Param->getDefaultArgument().getArgument().getAsTemplate(), Param->getDefaultArgument().getTemplateNameLoc(), AllTemplateArgs); @@ -2286,8 +2286,7 @@ Sema::SubstDefaultTemplateArgumentIfAvailable(TemplateDecl *Template, return TemplateArgumentLoc(); - NestedNameSpecifierLoc QualifierLoc - = TempTempParm->getDefaultArgument().getTemplateQualifierLoc(); + NestedNameSpecifierLoc QualifierLoc; TemplateName TName = SubstDefaultTemplateArgument(*this, Template, TemplateLoc, RAngleLoc, @@ -2679,8 +2678,7 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template, break; } - NestedNameSpecifierLoc QualifierLoc - = TempParm->getDefaultArgument().getTemplateQualifierLoc(); + NestedNameSpecifierLoc QualifierLoc; TemplateName Name = SubstDefaultTemplateArgument(*this, Template, TemplateLoc, RAngleLoc, |