From d863d31f4bc8dc652c368b809c4a330eeb56772b Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 9 Mar 2012 15:39:11 +0000 Subject: [PATCH] [AST] Add DeclaratioName::getLoc{Start,End} for consistency. llvm-svn: 152409 --- clang/include/clang/AST/DeclarationName.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clang/include/clang/AST/DeclarationName.h b/clang/include/clang/AST/DeclarationName.h index 83594fb0c87d..eb7d39b0ba1a 100644 --- a/clang/include/clang/AST/DeclarationName.h +++ b/clang/include/clang/AST/DeclarationName.h @@ -515,6 +515,13 @@ public: SourceLocation EndLoc = getEndLoc(); return SourceRange(BeginLoc, EndLoc.isValid() ? EndLoc : BeginLoc); } + SourceLocation getLocStart() const { + return getBeginLoc(); + } + SourceLocation getLocEnd() const { + SourceLocation EndLoc = getEndLoc(); + return EndLoc.isValid() ? EndLoc : getLocStart(); + } }; /// Insertion operator for diagnostics. This allows sending DeclarationName's