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

David Blaikie dblaikie at gmail.com
Wed Jul 10 11:48:08 PDT 2013

On Wed, Jul 10, 2013 at 11:43 AM, Ramkumar Ramachandra
<artagnon at gmail.com> wrote:
> David Blaikie wrote:
>> FWIW I'd sort of prefer just to have a generalized dead store warning
>> (special casing for parameters doesn't seem all that important -
>> though I could be wrong).
> Does LLVM have some existing code to detect a dead store that I can
> just hook into to fix the bug?  I agree that the {variable,parameter}
> might not be important in practice, but we need to be compatible with
> GCC.

Not at the moment - I've had half a mind to implement a generalized
dead store warning at some point. (& when I go to do so I'll start by
looking at the -Wsometimes-uninitialized implementation to get a feel
for how to visit loads/stores in the CFG, etc)

More information about the llvm-dev mailing list