summaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclarationName.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-03-09 15:39:11 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-03-09 15:39:11 +0000
commit406dac0027de79d809366bcb070dc69c560903c3 (patch)
tree7e9ff7e3e10f9bb0cc7d9e7b6544a7f5dc6467bd /include/clang/AST/DeclarationName.h
parent7b14026640d76145c4a9a9ac3b2e647bb49651f8 (diff)
downloadclang-406dac0027de79d809366bcb070dc69c560903c3.tar.gz
clang-406dac0027de79d809366bcb070dc69c560903c3.tar.bz2
clang-406dac0027de79d809366bcb070dc69c560903c3.tar.xz
[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
Diffstat (limited to 'include/clang/AST/DeclarationName.h')
-rw-r--r--include/clang/AST/DeclarationName.h7
1 files changed, 7 insertions, 0 deletions
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