[cfe-dev] [BUG] Support for W[no-]unused-but-set-{variable, parameter}

David Blaikie dblaikie at gmail.com
Fri Jul 12 10:12:49 PDT 2013


On Jul 12, 2013 2:12 AM, "Ramkumar Ramachandra" <artagnon at gmail.com> wrote:
>
> Nico Weber wrote:
> > The -variable one is http://llvm.org/bugs/show_bug.cgi?id=9824 , I
didn't
> > find a bug for -parameter. The bug has some discussion (and not one but
two
> > rdar numbers :-P).
>
> I added one a few days ago: http://llvm.org/bugs/show_bug.cgi?id=16589
>
> From what I understand, the bug still hasn't been fixed; and I would
> love for it to be fixed now.  From the discussion, it seems that I
> just have to hook into the static analyzer's dead-store check?

I expect its not /quite/ that simple, but don't know for sure. I personally
would start by looking at the implementation of -Wsometimes-uninitialized &
use a similar (but different) cfg/use/def walk.

> Can you
> give me some pointers on where I should be looking?  (I'm currently
> looking at Sema::DiagnoseUnusedParameters).

I suppose that's an interesting if place to look, but I doubt we store the
necessary bits for this warning (to differentiate a variable that only
written to from one that has reads and writes)

>
> Thanks.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130712/76823226/attachment.html>


More information about the cfe-dev mailing list