From: Daniel Dunbar Date: Fri, 9 Mar 2012 15:39:11 +0000 (+0000) Subject: [AST] Add DeclaratioName::getLoc{Start,End} for consistency. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=406dac0027de79d809366bcb070dc69c560903c3;p=clang [AST] Add DeclaratioName::getLoc{Start,End} for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152409 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h index 83594fb0c8..eb7d39b0ba 100644 --- a/include/clang/AST/DeclarationName.h +++ b/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