summaryrefslogtreecommitdiff
path: root/include/clang/Lex
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
commitecb7e5c8afe929ee38155db94de6b084ec32a645 (patch)
tree53010172e19c77ea447bcd89e117cda052ab52e0 /include/clang/Lex
parent5044f5c816adfd5cba17f1adee1a10127296d0bf (diff)
downloadsrc-test2-ecb7e5c8afe929ee38155db94de6b084ec32a645.tar.gz
src-test2-ecb7e5c8afe929ee38155db94de6b084ec32a645.zip
Notes
Diffstat (limited to 'include/clang/Lex')
-rw-r--r--include/clang/Lex/Lexer.h3
-rw-r--r--include/clang/Lex/Token.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index 0f36df43e232..6a6e319463f0 100644
--- a/include/clang/Lex/Lexer.h
+++ b/include/clang/Lex/Lexer.h
@@ -199,6 +199,9 @@ public:
/// the current file.
SourceLocation getSourceLocation() { return getSourceLocation(BufferPtr); }
+ /// \brief Return the current location in the buffer.
+ const char *getBufferLocation() const { return BufferPtr; }
+
/// Stringify - Convert the specified string into a C string by escaping '\'
/// and " characters. This does not add surrounding ""'s to the string.
/// If Charify is true, this escapes the ' character instead of ".
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 {