aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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