[AST] Add DeclaratioName::getLoc{Start,End} for consistency.

llvm-svn: 152409
This commit is contained in:
Daniel Dunbar 2012-03-09 15:39:11 +00:00
parent 7b93f636e0
commit d863d31f4b
1 changed files with 7 additions and 0 deletions

View File

@ -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