[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
Thu Apr 15 11:01:08 PDT 2021


mbenfield added a comment.

This is my first code submitted to LLVM; please tell me anything that should be done differently.

A couple decisions that should be considered:

- These warnings are not enabled by any other flags. This is different from gcc, where `-Wunused-but-set-variable` is enabled by `-Wextra` in combination with either `-Wunused` or `-Wall`.

- `-Wused-but-marked-unused` interacts with these in what may not be an ideal way. We can mark a variable unused to cause the `unused-but-set-variable` warning to not happen, but the `used-but-marked-unused` warning will still occur because the variable is set.


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