[sorry Doug, meant to reply to the list]<br><br><div class="gmail_quote">On Mon, Aug 29, 2011 at 9:29 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><div><div>>  I can't seem to figure out how to get the<br>
> SourceRange of the static/inline keyword from the FunctionDecl. Is<br>
> this possible? Could someone point me to the right place to find those<br>
> SourceRanges?<br>
<br>
</div></div></div><div class="im">I don't think we maintain that information in the FunctionDecl. It's in the DeclSpec, if it's still hanging around.<br></div></blockquote><div><br></div><div>Thanks Doug - that at least got me looking for the right type (the DeclSpec). <br>

<br>It seems (according to <a href="http://clang.llvm.org/doxygen/classclang_1_1Sema.html#a9b8436b6e81170462bf184c4755ba180" target="_blank">http://clang.llvm.org/doxygen/classclang_1_1Sema.html#a9b8436b6e81170462bf184c4755ba180</a> ) there are 3 callers of CheckFunctionDeclaration:</div>

<div><br></div><div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:14px;background-color:rgb(255, 255, 255)">* <a href="http://clang.llvm.org/doxygen/SemaDecl_8cpp_source.html#l04280" style="color:rgb(37, 46, 120);text-decoration:none;font-weight:bold" target="_blank">ActOnFunctionDeclarator()</a></span></div>

<div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:14px;background-color:rgb(255, 255, 255)">* <a href="http://clang.llvm.org/doxygen/SemaTemplateInstantiateDecl_8cpp_source.html#l01298" style="color:rgb(37, 46, 120);text-decoration:none;font-weight:bold" target="_blank">clang::TemplateDeclInstantiator::VisitCXXMethodDecl()</a></span></div>

<div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:14px;background-color:rgb(255, 255, 255)">* <a href="http://clang.llvm.org/doxygen/SemaTemplateInstantiateDecl_8cpp_source.html#l01012" style="color:rgb(37, 46, 120);text-decoration:none;font-weight:bold" target="_blank">clang::TemplateDeclInstantiator::VisitFunctionDecl()</a>.</span></div>

<div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:14px;background-color:rgb(255, 255, 255)"><br></span></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:14px">The first actually has access to the DeclSpec (through the Declarator parameter).<br>

The latter two are for member functions and templates - & I don't believe main can be templated, can it?<br><br>So should we just push the isMain/checkMain checking up into ActOnFunctionDeclarator instead? Then it wouldn't add any overhead to irrelevant contexts (methods & templates) & the checking could be more descriptive.</span></font></div>

<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:14px"><br></span></font></div><font color="#888888"><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:14px">- David</span></font></div>

</font></div>
</blockquote></div><br>