[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 18 09:36:29 PDT 2025


AaronBallman wrote:

> > @cor3ntin I question if `-Wloop-analysis` should be completely rewritten using dataflow analysis, rather than AST based matching.
> 
> That's an interesting idea, but I don't think that should stop us from landing this improvement. Maybe we want to open an issue for that? @AaronBallman

Yeah, that really should be reworked -- the diagnostic is already off-by-default, so users need to explicitly request it, which means making it an analysis-based diagnostic based on the CFG isn't going to cause compile time performance concerns IMO.

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


More information about the cfe-commits mailing list