[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 12:48:37 PDT 2021


mbenfield updated this revision to Diff 337877.
mbenfield added a comment.

Updates in response to comments.

- Parameters.empty() and early exit.

- comments in VisitDeclRefExpr.

- clearer description of the warnings.

Also, changed the name of DiagnoseUnusedDecls to DiagnoseUnusedButSetDecls for
clarity and to avoid confusion with Sema::DiagnoseUnusedDecl.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100581

Files:
  clang/include/clang/Basic/DiagnosticGroups.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaStmt.cpp
  clang/test/Sema/vector-gcc-compat.c
  clang/test/Sema/warn-unused-but-set-parameters-cpp.cpp
  clang/test/Sema/warn-unused-but-set-parameters.c
  clang/test/Sema/warn-unused-but-set-variables-cpp.cpp
  clang/test/Sema/warn-unused-but-set-variables.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100581.337877.patch
Type: text/x-patch
Size: 14209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210415/ffaff2fd/attachment-0001.bin>


More information about the cfe-commits mailing list