aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Lexer.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-19 15:59:14 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-19 15:59:14 +0000
commit11b652d41d0d97380ab321a1dba48ecb044f9de8 (patch)
tree94aa7ff36d083794630aa801f3166d96c80993bb /include/clang/Lex/Lexer.h
parent69bda4c027671df7163619f215209529eb236620 (diff)
Introduce Lexer::makeFileCharRange() that accepts a token source range
and returns a character range with file locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Lexer.h')
-rw-r--r--include/clang/Lex/Lexer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index 99c16d292a..eb8ad347d6 100644
--- a/include/clang/Lex/Lexer.h
+++ b/include/clang/Lex/Lexer.h
@@ -331,6 +331,14 @@ public:
const LangOptions &LangOpts,
SourceLocation *MacroEnd = 0);
+ /// \brief Accepts a token source range and returns a character range with
+ /// file locations.
+ /// Returns a null range if a part of the range resides inside a macro
+ /// expansion or the range does not reside on the same FileID.
+ static CharSourceRange makeFileCharRange(SourceRange TokenRange,
+ const SourceManager &SM,
+ const LangOptions &LangOpts);
+
/// \brief Retrieve the name of the immediate macro expansion.
///
/// This routine starts from a source location, and finds the name of the macro