[llvm] r184271 - Remove unused parameter.

David Blaikie dblaikie at gmail.com
Wed Jun 19 12:37:05 PDT 2013


On Wed, Jun 19, 2013 at 11:42 AM, Sean Silva <silvas at purdue.edu> wrote:
>
>
>
> On Tue, Jun 18, 2013 at 7:46 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> On Jun 18, 2013 6:12 PM, "Sean Silva" <silvas at purdue.edu> wrote:
>> > Not sure why we weren't catching this with -Wunused-parameter...
>>
>> Could you narrow down case test case and file a bug?
>
> Actually, it turns out that llvm's build has -Wno-unused-parameter enabled.
> The following is from `cmake/modules/HandleLLVMOptions.cmake`:
>
> elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
>   if (LLVM_ENABLE_WARNINGS)
>     append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS
> CMAKE_CXX_FLAGS)
>
> The makefiles have something similar.
>
> A bit of archaeology (bless git's "pickaxe" functionality!) reveals that
> this was introduced in r31380 in 2006, and has been copied forward ever
> since.

Perhaps we could have a brief discussion on llvm-dev about enabling
it? There are honestly cases where it's not helpful (virtual functions
with necessary parameters, so you name them for documentation purposes
(it's that or comment out the name, which isn't much better) - though
I suppose we could improve the warning to skip that case). Could be
worth checking to see how far from clean we are & if there are any
lingering bugs it uncovers.



More information about the llvm-commits mailing list