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