aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-06 18:33:12 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-06 18:33:12 +0000
commit7e9b57b9db85704e0e18204343301826fd020101 (patch)
tree6a2fcc2f02cf86f9faf1469ba45e5e15c05b9832 /lib/Sema/SemaTemplate.cpp
parentaf57280ff8f5df43c413becfbf2415e0cdce9437 (diff)
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
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp3
1 files changed, 2 insertions, 1 deletions
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();