aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-19 15:59:19 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-19 15:59:19 +0000
commite64d9037658a1b95c79ea275af6167a110b3c563 (patch)
tree79bac7a7812f12b2c41875e32869b4ff9d5e79b2 /include/clang/Lex
parent11b652d41d0d97380ab321a1dba48ecb044f9de8 (diff)
Introduce Lexer::getSourceText() that returns a string for the source
that the given source range encompasses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex')
-rw-r--r--include/clang/Lex/Lexer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index eb8ad347d6..a935718e6f 100644
--- a/include/clang/Lex/Lexer.h
+++ b/include/clang/Lex/Lexer.h
@@ -339,6 +339,12 @@ public:
const SourceManager &SM,
const LangOptions &LangOpts);
+ /// \brief Returns a string for the source that the range encompasses.
+ static StringRef getSourceText(CharSourceRange Range,
+ const SourceManager &SM,
+ const LangOptions &LangOpts,
+ bool *Invalid = 0);
+
/// \brief Retrieve the name of the immediate macro expansion.
///
/// This routine starts from a source location, and finds the name of the macro