From: Douglas Gregor Date: Thu, 29 Oct 2009 17:56:10 +0000 (+0000) Subject: Yet more instantiation-location information. Fixes PR5336. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd2300e1ee0eab6c51862a92d3f3c72540b36b23;p=clang Yet more instantiation-location information. Fixes PR5336. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85516 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index 5b78375e56..cb7b69fc95 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -4453,6 +4453,8 @@ TreeTransform::TransformUnresolvedDeclRefExpr( template Sema::OwningExprResult TreeTransform::TransformTemplateIdRefExpr(TemplateIdRefExpr *E) { + TemporaryBase Rebase(*this, E->getTemplateNameLoc(), DeclarationName()); + TemplateName Template = getDerived().TransformTemplateName(E->getTemplateName()); if (Template.isNull()) diff --git a/test/SemaTemplate/template-id-expr.cpp b/test/SemaTemplate/template-id-expr.cpp new file mode 100644 index 0000000000..a0cbe44084 --- /dev/null +++ b/test/SemaTemplate/template-id-expr.cpp @@ -0,0 +1,14 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +// PR5336 +template +struct isa_impl_cl { + template + static void isa(const FromCl &Val) { } +}; + +template +void isa(const Y &Val) { return isa_impl_cl::template isa(Val); } + +class Value; +void f0(const Value &Val) { isa(Val); }