+    D.getFunctionDefinitionKind () == FDK_Definition) {
+  // [6.9.1/3] qualified void return is invalid on a C

Please remove the extra space before () here. Otherwise, LGTM, thanks!

On Sun, Dec 14, 2014 at 5:37 PM, Nathan Sidwell <[email protected]> wrote:

> This patch fixes a really pedantic error reported as 20146
> http://llvm.org/bugs/show_bug.cgi?id=20146
>
> Apparently in C a void function definition cannot use a qualified void
> return.type.  c99 [6.9.1]/3 says:
>
>  The return type of a function shall be void or an object type other than
>> array type.
>>
>
> There appears no such restriction on a function declaration. (6.9.1 is
> explicitly about a function definition)
>
> C++ appears explicitly bless it in c++ 03 [6.6.3]/3 says:
>
>  A return statement with an expression of type “cv void” can be
>>
> > used only in functions with a return type of cv void; the expression
> > is evaluated just before the function returns to its caller.
>
>
> OK?
>
> nathan
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to