From d890b734f81f50a45efe93c8d121728a0760a649 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 6 Jul 2010 18:33:12 +0000 Subject: Correctly set the location of the "template" keyword for a class template specialization, from Peter Collingbourne. llvm-svn: 107682 --- clang/lib/Sema/SemaTemplate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaTemplate.cpp') diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 336a7bf9d04..af1cb50006e 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -3959,7 +3959,8 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TemplateArgs, CanonType); if (TUK != TUK_Friend) { Specialization->setTypeAsWritten(WrittenTy); - Specialization->setTemplateKeywordLoc(KWLoc); + if (TemplateParams) + Specialization->setTemplateKeywordLoc(TemplateParams->getTemplateLoc()); } TemplateArgsIn.release(); -- cgit v1.2.3