]> granicus.if.org Git - clang/commitdiff
Correctly set the location of the "template" keyword for a class
authorDouglas Gregor <dgregor@apple.com>
Tue, 6 Jul 2010 18:33:12 +0000 (18:33 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 6 Jul 2010 18:33:12 +0000 (18:33 +0000)
template specialization, from Peter Collingbourne.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107682 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp

index 336a7bf9d0474e3bda9befd8a32c984c7c526813..af1cb50006e145a081414af4366b72874fb137f8 100644 (file)
@@ -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();