Fix getLocForEndOfToken to not double-count spurious internal characters

within a token, like trigraphs and escaped newlines.               
Patch by Marcin Kowalczyk!

llvm-svn: 128978
This commit is contained in:
John McCall 2011-04-06 01:50:22 +00:00
parent 0ec0e98a6a
commit 75ca6d72c2
1 changed files with 1 additions and 1 deletions

View File

@ -674,7 +674,7 @@ SourceLocation Lexer::getLocForEndOfToken(SourceLocation Loc, unsigned Offset,
else
return Loc;
return AdvanceToTokenCharacter(Loc, Len, SM, Features);
return Loc.getFileLocWithOffset(Len);
}
//===----------------------------------------------------------------------===//