<div dir="ltr">You can look at it's type and check if it has a function prototype (i.e. it has parameters or (void), see the FunctionProtoType class), e.g. FD->getType()->isFunctionProtoType() .</div><div class="gmail_extra"><br><div class="gmail_quote">On 18 July 2017 at 10:33, Frank Redeker via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello list,<br>
<br>
is there is an easy way to distinguish if a function is declared as<br>
<br>
void foo (void);<br>
or<br>
void foo ();<br>
<br>
The reason I'm asking is that I use an ASTVisitor to generate stub<br>
functions. But the compiler that I use reports an error when the<br>
prototype is declared with (void) but the implementation not.<br>
<br>
<br>
Frank<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>