<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">What is the impact on performance here (if any)?<div><br><div><div>On Apr 5, 2011, at 6:41 AM, Marcin Kowalczyk wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Mon, Apr 4, 2011 at 7:27 PM, John McCall <<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>> wrote:<br><br>>> I guess that MeasureTokenLength() includes any backslash-newline<br>>> pairs, but AdvanceToTokenCharacter() skips them. I'm not sure in which<br>

>> direction this should be fixed.<br>><br>> I *think* the right solution here is for getLocForEndOfToken to just use<br>> getFileLocWithOffset instead of AdvanceToTokenCharacter.  Would<br>> you mind writing that up and testing it?<br>

<br>Yes, results look fine with this change.<br><br>--- /tmp/g4-89926/cache/depot/google3/third_party/llvm/trunk/tools/clang/lib/Lex/Lexer.cpp#33     2011-03-22 01:58:24.000000000 +0100<br>+++ /home/qrczak/qrczak-janitor/google3/third_party/llvm/trunk/tools/clang/lib/Lex/Lexer.cpp       2011-04-05 13:02:09.557044000 +0200<br>

@@ -674,7 +674,7 @@<br>   else<br>     return Loc;<br>   <br>-  return AdvanceToTokenCharacter(Loc, Len, SM, Features);<br>+  return Loc.getFileLocWithOffset(Len);<br> }<br> <br> //===----------------------------------------------------------------------===//<br>

<br>-- <br>Marcin Kowalczyk<br><br>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></div></body></html>