aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Token.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Lex/Token.h')
-rw-r--r--include/clang/Lex/Token.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Lex/Token.h b/include/clang/Lex/Token.h
index 604eae1027aa..b5dde9a700e8 100644
--- a/include/clang/Lex/Token.h
+++ b/include/clang/Lex/Token.h
@@ -124,6 +124,10 @@ public:
UintData = L.getRawEncoding();
}
+ SourceLocation getLastLoc() const {
+ return isAnnotation() ? getAnnotationEndLoc() : getLocation();
+ }
+
/// getAnnotationRange - SourceRange of the group of tokens that this
/// annotation token represents.
SourceRange getAnnotationRange() const {