<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 22, 2009, at 10:18 AM, Argyrios Kyrtzidis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jun 22, 2009, at 9:37 AM, Douglas Gregor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br></div></blockquote></div><div><blockquote type="cite"><div><blockquote type="cite">bool FunctionDecl::isMain() const {<br></blockquote><blockquote type="cite">  return getDeclContext()->getLookupContext()->isTranslationUnit() &&<br></blockquote><blockquote type="cite">    getIdentifier() && getIdentifier()->isStr("main");<br></blockquote><blockquote type="cite">@@ -481,6 +493,10 @@<br></blockquote><blockquote type="cite">    void *Mem = C.Allocate(sizeof(ParmVarDecl*)*NumParams);<br></blockquote><blockquote type="cite">    ParamInfo = new (Mem) ParmVarDecl*[NumParams];<br></blockquote><blockquote type="cite">    memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams);<br></blockquote><blockquote type="cite">+<br></blockquote><blockquote type="cite">+    // Update source range.<br></blockquote><blockquote type="cite">+    if (EndRangeLoc < NewParamInfo[NumParams-1]->getLocEnd())<br></blockquote><blockquote type="cite">+      EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();<br></blockquote><blockquote type="cite">  }<br></blockquote><blockquote type="cite">}<br></blockquote><br><br>I don't think we need to use the < here.<br></div></blockquote><div><br></div><div>This is to allow the flexibility to set EndRangeLoc before setting the parameters.</div><div>i.e. at <span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">PCHDeclReader::VisitFunctionDecl, EndRangeLoc is set before the setParams() call. If the check was missing we would have to be careful about the exact order of the calls to "reconstruct" the FunctionDecl.</span></div></div></div></blockquote></div><br><div>Ah, okay. Thanks for the clarification!</div></body></html>