[cfe-commits] r128978 - /cfe/trunk/lib/Lex/Lexer.cpp

John McCall rjmccall at apple.com
Tue Apr 5 18:50:23 PDT 2011


Author: rjmccall
Date: Tue Apr  5 20:50:22 2011
New Revision: 128978

URL: http://llvm.org/viewvc/llvm-project?rev=128978&view=rev
Log:
Fix getLocForEndOfToken to not double-count spurious internal characters     
within a token, like trigraphs and escaped newlines.               
Patch by Marcin Kowalczyk!


Modified:
    cfe/trunk/lib/Lex/Lexer.cpp

Modified: cfe/trunk/lib/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Lexer.cpp?rev=128978&r1=128977&r2=128978&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Lexer.cpp (original)
+++ cfe/trunk/lib/Lex/Lexer.cpp Tue Apr  5 20:50:22 2011
@@ -674,7 +674,7 @@
   else
     return Loc;
   
-  return AdvanceToTokenCharacter(Loc, Len, SM, Features);
+  return Loc.getFileLocWithOffset(Len);
 }
 
 //===----------------------------------------------------------------------===//





More information about the cfe-commits mailing list