Argyrios Kyrtzidis
a83f4d2315
Change Lexer::makeFileCharRange() to have it accept a CharSourceRange
...
instead of a SourceRange, and handle the case where the range is
a char (not token) range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149677 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-03 05:58:29 +00:00
Douglas Gregor
dc58aa7102
Thread a TargetInfo through to the module map; we'll need it for
...
target-specific module requirements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 06:01:29 +00:00
Argyrios Kyrtzidis
7f6cf9764b
Improve Lexer::getImmediateMacroName to take into account inner macros
...
of macro arguments.
For "MAC1( MAC2(foo) )" and location of 'foo' token it would return
"MAC1" instead of "MAC2".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148704 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-23 16:58:33 +00:00
Argyrios Kyrtzidis
d9806c912a
Enhance Lexer::makeFileCharRange to check for ranges inside a macro argument
...
expansion, in which case it returns a file range in the location where the
argument was spelled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148551 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20 16:52:43 +00:00
Benjamin Kramer
65eccf007d
Silence set-but-unused warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 21:12:23 +00:00
Argyrios Kyrtzidis
e64d903765
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
2012-01-19 15:59:19 +00:00
Argyrios Kyrtzidis
11b652d41d
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
2012-01-19 15:59:14 +00:00
Argyrios Kyrtzidis
69bda4c027
For Lexer's isAt[Start/End]OfMacroExpansion add an out parameter for the macro
...
start/end location.
It is commonly needed after calling the function; with this way we avoid
recalculating it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148479 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 15:59:08 +00:00
Argyrios Kyrtzidis
19d5aea478
Add unit testing for Lexer.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148478 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 15:59:01 +00:00