<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 27, 2011, at 1:57 PM, Anna Zaks wrote:</div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>In Lexer.h, please also add a non-static version of FindLocationAfterToken which doesn't require LangOpts and SourceMgr, just as a convenience (it should forward to the version you already have).</div><div><br></div></div></blockquote><div><br></div>Lexer does not currently have a SourceMgr member. Adding a non-static method just for the convenience of not passing LangOpts might be an overkill?</div></div></blockquote><div><br></div>Aha, ok!</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br>SourceLocation loc..</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">Please capitalize local variable names.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">+ // Lex from the start of the given location.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">+ Lexer lexer(SM.getLocForStartOfFile(locInfo.first), LangOpts, file.begin(),</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">+ tokenBegin, file.end());</div><div><br></div><div>it seems that it would be more convenient to use this Lexer ctor:</div><div><br></div><div><div><div> Lexer(FileID FID, const llvm::MemoryBuffer *InputBuffer,</div><div> const SourceManager &SM, const LangOptions &Features);</div></div></div><div><br></div></div></div></blockquote><div><br></div><div>We need the lexer to start processing the buffer starting from the specific position Loc. This constructor seems to be convenient if we were to start lexing from the beginning of the file.</div></div></div></blockquote></div><br><div>ok!</div><div><br></div><div>-Chris</div></body></html>