diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-04 14:20:30 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-04 14:20:30 +0000 |
commit | 4a85a73466bfb541cd9c7b57a99292a0b6900b9b (patch) | |
tree | 4cc187ed4d1dfa6d8f6d34ac05963b83b250be9d /lib/AST/DeclTemplate.cpp | |
parent | c54061a679d8db4169438b2f97f81e3f443c6a25 (diff) |
Fixed source range for ClassTemplateSpecializationDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclTemplate.cpp')
-rw-r--r-- | lib/AST/DeclTemplate.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp index 6923a60928..0554cfca3a 100644 --- a/lib/AST/DeclTemplate.cpp +++ b/lib/AST/DeclTemplate.cpp @@ -577,6 +577,19 @@ ClassTemplateSpecializationDecl::getSpecializedTemplate() const { return SpecializedTemplate.get<ClassTemplateDecl*>(); } +SourceRange +ClassTemplateSpecializationDecl::getSourceRange() const { + if (!ExplicitInfo) + return SourceRange(); + SourceLocation Begin = getExternLoc(); + if (Begin.isInvalid()) + Begin = getTemplateKeywordLoc(); + SourceLocation End = getRBraceLoc(); + if (End.isInvalid()) + End = getTypeAsWritten()->getTypeLoc().getEndLoc(); + return SourceRange(Begin, End); +} + //===----------------------------------------------------------------------===// // ClassTemplatePartialSpecializationDecl Implementation //===----------------------------------------------------------------------===// |