[cfe-commits] [Patch] Better wording for return with value from constructor

Jordy Rose jediknil at belkadan.com
Wed Jun 29 18:09:20 PDT 2011


Why not put the "void" into the select?

%select{void function|void method|constructor|destructor}1


On Jun 29, 2011, at 18:05, Hans Wennborg wrote:

> Hi all,
> 
> The attached patch changes the error message for returning a value
> from a constructor or destructor from: "void function 'C' should not
> return a value" to "constructor 'C' should not return a value".
> 
> The warning definition does get a bit messier, so please comment if
> there's a nicer way to do it.
> 
> Thanks,
> Hans
> <return-has-expr.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list