[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 Feb 13 04:44:47 PST 2026
================
@@ -1996,9 +1996,33 @@ namespace {
}
void VisitDeclRefExpr(DeclRefExpr *E) {
- if (VarDecl *VD = dyn_cast<VarDecl>(E->getDecl()))
+ if (VarDecl *VD = dyn_cast<VarDecl>(E->getDecl())) {
----------------
AaronBallman wrote:
```suggestion
if (const auto *VD = dyn_cast<VarDecl>(E->getDecl())) {
```
https://github.com/llvm/llvm-project/pull/135573
More information about the cfe-commits
mailing list