[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

Michael Benfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 19 17:02:43 PDT 2021


mbenfield added a comment.

In D100581#2699412 <https://reviews.llvm.org/D100581#2699412>, @xbolva00 wrote:

> I am a little bit worried that another off by default warning is not ideal from user point of view. Either the user simply would fail to find out that there is a new option or will be surprised that gcc fires and clang does not even when we claim we implemented this “gcc’s” warning.

Understood. How about putting `-Wunused-but-set-parameter` in `-Wextra` (which is what clang does for `-Wunused-parameter`) and `-Wunused-but-set-variable` in `-Wunused` (which is what gcc does)? I don't know why the parameter ones go in `-Wextra` and the variable ones go in `-Wunused`, but this seems most consistent with currrent diagnostic groups.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100581



More information about the cfe-commits mailing list