<div dir="ltr">On Sat, Jun 29, 2013 at 11:35 PM, Lubos Lunak <span dir="ltr"><<a href="mailto:l.lunak@suse.cz" target="_blank">l.lunak@suse.cz</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Hello,<br>
<br>
could somebody please review and commit the atached patch for pr14795? Thank<br>
you.<br><br></blockquote><div><br></div><div>--- a/lib/Lex/Lexer.cpp</div><div>+++ b/lib/Lex/Lexer.cpp</div><div>@@ -2372,8 +2372,9 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {</div><div> FormTokenWithChars(Result, CurPtr, tok::eod);</div>
<div> </div><div> // Restore comment saving mode, in case it was disabled for directive.</div><div>- resetExtendedTokenMode();</div><div>- return true; // Have a token.</div><div>+ if (PP)</div><div>+ resetExtendedTokenMode();</div>
<div>+ return true; // Have a token.</div><div> }</div><div> </div><div> // If we are in raw mode, return this event as an EOF token. Let the caller</div><div><br></div><div>How is this related?</div><div><br></div>
<div>+ // We surround every #include by #if 0 to comment it out, but that</div><div>+ // changes line numbers. These are fixed up right after that, but</div><div>+ // the whole #include could be inside a preprocessor conditional</div>
<div>+ // that is not processed. So it is necessary to fix the line</div><div><br></div><div>This looks like it puts a line directive after every if/elif/else/endif. That not really a problem, I guess, but it would be nice to avoid if possible.</div>
<div><br></div><div>Otherwise, looks fine.</div><div><br></div><div>-Eli</div></div></div></div>