<div dir="ltr">+<span class="" style="white-space:pre">       </span>    D.getFunctionDefinitionKind () == FDK_Definition) {<br><div>+<span class="" style="white-space:pre">   </span>  // [6.9.1/3] qualified void return is invalid on a C<br></div><div><br></div><div>Please remove the extra space before () here. Otherwise, LGTM, thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 14, 2014 at 5:37 PM, Nathan Sidwell <span dir="ltr"><<a href="mailto:nathan@acm.org" target="_blank">nathan@acm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch fixes a really pedantic error reported as 20146 <a href="http://llvm.org/bugs/show_bug.cgi?id=20146" target="_blank">http://llvm.org/bugs/show_bug.<u></u>cgi?id=20146</a><br>
<br>
Apparently in C a void function definition cannot use a qualified void return.type.  c99 [6.9.1]/3 says:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The return type of a function shall be void or an object type other than array type.<br>
</blockquote>
<br>
There appears no such restriction on a function declaration. (6.9.1 is explicitly about a function definition)<br>
<br>
C++ appears explicitly bless it in c++ 03 [6.6.3]/3 says:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A return statement with an expression of type “cv void” can be<br>
</blockquote>
> used only in functions with a return type of cv void; the expression<br>
> is evaluated just before the function returns to its caller.<br>
<br>
<br>
OK?<span class="HOEnZb"><font color="#888888"><br>
<br>
nathan<br>
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>