MuAlphaOmegaEpsilon added a comment.

The warning would be correct if the compiler could actually tell the parameter 
is unused, but at the moment it cannot, as far as I know.

I stumbled upon this thing myself, and there are a few ways to silence the 
warning:
-removing names
-marking every single parameter as unused

The first one makes the function less readable, and forces me to add extra 
declarations or documentation to explain to the user the purpose of each 
parameter.

The second one is quite cumbersome to implement and it clutters the code quite 
a bit.

I consider these as sub-optimal scenarios, given that whatever I choose I only 
get drawbacks in order to silence a warning that I think shouldn't really be 
there in the first place. :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116778/new/

https://reviews.llvm.org/D116778

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to