From: Douglas Gregor Date: Tue, 6 Jul 2010 18:33:12 +0000 (+0000) Subject: Correctly set the location of the "template" keyword for a class X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e9b57b9db85704e0e18204343301826fd020101;p=clang Correctly set the location of the "template" keyword for a class template specialization, from Peter Collingbourne. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107682 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 336a7bf9d0..af1cb50006 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/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();