patch: clarify diagnostic when returned value doesn't match function return type

Nick Lewycky via cfe-commits cfe-commits at
Mon Aug 10 19:08:31 PDT 2015

This simple-minded patch extends the case where we report "no viable
conversion from 'X' to 'Y'" to emit a more useful diagnostic "no viable
conversion from returned value of type 'X' to function return type 'Y'"
when used in that context.

In lieu of adding tests for this diagnostic explicitly, I've only updated
the tests where the patch changes their result.

Please review!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clarify-nonviable-return-1.patch
Type: text/x-patch
Size: 4191 bytes
Desc: not available
URL: <>

More information about the cfe-commits mailing list