Teach TemplateDecl::getSourceRange() to cover the entire declaration,

from Peter Collingbourne!

llvm-svn: 105951
This commit is contained in:
Douglas Gregor 2010-06-14 20:02:51 +00:00
parent 329ea064ed
commit 7d14ffc6ef
1 changed files with 5 additions and 0 deletions

View File

@ -264,6 +264,11 @@ public:
return K >= firstTemplate && K <= lastTemplate;
}
SourceRange getSourceRange() const {
return SourceRange(TemplateParams->getTemplateLoc(),
TemplatedDecl->getSourceRange().getEnd());
}
protected:
NamedDecl *TemplatedDecl;
TemplateParameterList* TemplateParams;