[clang-tools-extra] [clang-tidy] Add new check 'misc-scope-reduction' (PR #175429)
Oliver Stöneberg via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 11 04:41:58 PST 2026
firewave wrote:
It would make sense to add some negative tests which show that this is not applied to non-trivial types and types with side effects (for now).
Also should there be aliases for some of the guidelines it implements? There would allow the (default) behavior of the generic named check to be extended without affecting the guideline-based specifications.
And an external source regarding possible future improvements (obviously out of scope for this PR): https://trac.cppcheck.net/query?status=accepted&status=assigned&status=new&status=reopened&keywords=~variableScope&component=Improve+check&order=priority.
https://github.com/llvm/llvm-project/pull/175429
More information about the cfe-commits
mailing list