[cfe-commits] [patch] Fix assertion with -Wmissing-noreturn in Obj-C method.

Jean-Daniel Dupas devlists at shadowlab.org
Fri Sep 9 06:48:06 PDT 2011


Le 7 sept. 2011 à 15:15, Joerg Sonnenberger a écrit :

> On Wed, Sep 07, 2011 at 02:12:27PM +0200, Jean-Daniel Dupas wrote:
>> commit r138854 (Improve the diagnostic text for -Wmissing-noreturn to include the name of the function) does not handle Obj-C method case, and cause clang to assert when trying to emit the diagnostic due to a missing diagnostic argument.
>> 
>> This patch add Obj-C method handling (and update the diagnostic output to use either "function" or "method" accordingly).
> 
> Personally I would prefer two different warnings to make it easier to
> search for them. Otherwise this looks good.
> 
> Joerg

This is an other version of the patch using 2 diagnostics instead, but I'm not sure it is of any value in that specific case.

The implementation for both diagnostics in the same, but at the time we want to emit it, and as the diagnostic name is stored in a 
variable at an other place in the class, it does not make it really easier to search for.

I also attached the first version in case you want to compare both.

-- Jean-Daniel



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2-diags.patch
Type: application/octet-stream
Size: 2436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110909/e2627fb5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noreturn.patch
Type: application/octet-stream
Size: 1974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110909/e2627fb5/attachment-0001.obj>


More information about the cfe-commits mailing list