aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-04-06 01:50:22 +0000
committerJohn McCall <rjmccall@apple.com>2011-04-06 01:50:22 +0000
commit77ebb3829f2abb9be2d40927b793b72347626aad (patch)
tree1413e92648044cc135cd568ef56904280c91b828 /lib/Lex/Lexer.cpp
parent97edcb639347a4770e59af66d20abcd2b37bb4e5 (diff)
Fix getLocForEndOfToken to not double-count spurious internal characters
within a token, like trigraphs and escaped newlines. Patch by Marcin Kowalczyk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r--lib/Lex/Lexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 6f3d611fb0..34b16c7477 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -674,7 +674,7 @@ SourceLocation Lexer::getLocForEndOfToken(SourceLocation Loc, unsigned Offset,
else
return Loc;
- return AdvanceToTokenCharacter(Loc, Len, SM, Features);
+ return Loc.getFileLocWithOffset(Len);
}
//===----------------------------------------------------------------------===//