[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-06-03 Thread Luca Versari via Phabricator via cfe-commits
veluca93 updated this revision to Diff 434026. veluca93 marked 3 inline comments as done. veluca93 added a comment. Respond to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124918/new/ https://reviews.llvm.org/D124918 Files: clang-tools

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-06-03 Thread Luca Versari via Phabricator via cfe-commits
veluca93 marked 5 inline comments as done. veluca93 added a comment. In D124918#3555719 , @ymandel wrote: > Luca, > > Can you expand the description to give a better intuition as to what this > check is finding that the diagnostic does not? The example i

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-30 Thread Luca Versari via Phabricator via cfe-commits
veluca93 marked 2 inline comments as done. veluca93 added a comment. @LegalizeAdulthood friendly ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124918/new/ https://reviews.llvm.org/D124918 ___ cfe

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-17 Thread Luca Versari via Phabricator via cfe-commits
veluca93 marked an inline comment as done. veluca93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-unused-no-side-effect.rst:172-173 +List of functions that are considered not to read some of their arguments +unless their return value is

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-16 Thread Luca Versari via Phabricator via cfe-commits
veluca93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-unused-no-side-effect.rst:93 + { + "std::string": ["swap"], + "absl::int128": [], LegalizeAdulthood wrote: > Since `std::string` is just a type alias, sh

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-16 Thread Luca Versari via Phabricator via cfe-commits
veluca93 updated this revision to Diff 429745. veluca93 marked 6 inline comments as done. veluca93 added a comment. Switch from bitmasks to arrays. Add more tests & update doc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124918/new/ https://revie

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 marked an inline comment as done. veluca93 added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnusedNoSideEffectCheck.cpp:135 +// or class, and that there are no side effects on `this`. +if (auto *Callee = dyn_cast(Call->getCallee())) {

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 updated this revision to Diff 427013. veluca93 added a comment. Missing `const` from auto * Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124918/new/ https://reviews.llvm.org/D124918 Files: clang-tools-extra/clang-tidy/performance/CMake

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 updated this revision to Diff 427007. veluca93 marked 7 inline comments as done. veluca93 added a comment. Address first round of review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124918/new/ https://reviews.llvm.org/D124918

[PATCH] D124918: Add a new clang-tidy for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 created this revision. Herald added subscribers: carlosgalvezp, mgorny. Herald added a project: All. veluca93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This check is meant to detect case that -Wunused-variable doe