From 7d14ffc6ef5c8f1ab3b6f58fff754c45d5871a0d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 14 Jun 2010 20:02:51 +0000 Subject: [PATCH] Teach TemplateDecl::getSourceRange() to cover the entire declaration, from Peter Collingbourne! llvm-svn: 105951 --- clang/include/clang/AST/DeclTemplate.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index b977e298be6e..74c579b6022e 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -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;