From 75ca6d72c2964bc931715510dad99f587584f583 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 6 Apr 2011 01:50:22 +0000 Subject: [PATCH] Fix getLocForEndOfToken to not double-count spurious internal characters within a token, like trigraphs and escaped newlines. Patch by Marcin Kowalczyk! llvm-svn: 128978 --- clang/lib/Lex/Lexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index 6f3d611fb075..34b16c747773 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/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); } //===----------------------------------------------------------------------===//