[clang-tools-extra] [clang-tidy] Add new check 'misc-scope-reduction' (PR #175429)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 20 02:27:15 PST 2026


vabridgers wrote:

I've implemented an "accumulator pattern" detection to avoid those false positives, expanded the LITs and rerun a "systems" level analysis on an LLVM/clang build. The false positives have been greatly reduced, and the checker is detecting real "broad scope" patterns. 

There's probably a few more steps to take, such as using matchers for "accumulator pattern" detection, but I think this is getting close. Please take a look at the progress an let me know what's needed to finish this up for merging. Best

https://github.com/llvm/llvm-project/pull/175429


More information about the cfe-commits mailing list