[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
Wed Apr 21 09:38:02 PDT 2021
mbenfield updated this revision to Diff 339275.
mbenfield added a comment.
Herald added subscribers: frasercrmck, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb.
Response to review comments.
- Diagnostic groups: UnusedButSetVariable into Unused and UnusedButSetParameter into Extra
- Early exit from VisitBinaryOperator
- Idiomatic `if (Decl *D = ...)`
- Add `-Wno-unused-but-set-parameter` and `-Wno-unused-but-set-variable` to many tests (necessary since these were added to diagnostic groups)
- Don't flag for const or constexpr variables
- Test case for const and constexpr variables
- Move C++ test cases to SemaCXX
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/CodeGen/X86/x86_32-xsave.c
clang/test/CodeGen/X86/x86_64-xsave.c
clang/test/CodeGen/builtins-arm.c
clang/test/CodeGen/builtins-riscv.c
clang/test/FixIt/fixit.cpp
clang/test/Misc/warning-wall.c
clang/test/Sema/shift.c
clang/test/Sema/vector-gcc-compat.c
clang/test/Sema/warn-unused-but-set-parameters.c
clang/test/Sema/warn-unused-but-set-variables.c
clang/test/SemaCXX/goto.cpp
clang/test/SemaCXX/shift.cpp
clang/test/SemaCXX/sizeless-1.cpp
clang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp
clang/test/SemaCXX/warn-unused-but-set-variables-cpp.cpp
clang/test/SemaObjC/foreach.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100581.339275.patch
Type: text/x-patch
Size: 30979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210421/f198540f/attachment-0001.bin>
More information about the cfe-commits
mailing list