================ @@ -215,10 +236,18 @@ static bool overlap(ArrayRef<CallGraphNode *> SCC, /// returns true iff `Cond` involves at least one static local variable. static bool hasStaticLocalVariable(const Stmt *Cond) { - if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) + if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) { if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) if (VD->isStaticLocal()) return true; + + if (const auto *BD = dyn_cast<BindingDecl>(DRE->getDecl())) + if (const auto *DD = + dyn_cast_if_present<DecompositionDecl>(BD->getDecomposedDecl())) ---------------- vbvictor wrote:
same with `dyn_cast_if_present` here https://github.com/llvm/llvm-project/pull/144213 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits