================
@@ -83,6 +83,23 @@ static bool isVarThatIsPossiblyChanged(const Decl *Func, 
const Stmt *LoopStmt,
              isChanged(LoopStmt, Var, Context);
       // FIXME: Track references.
     }
+
+    if (const auto *BD = dyn_cast<BindingDecl>(DRE->getDecl())) {
+      if (const auto *DD =
+              dyn_cast_if_present<DecompositionDecl>(BD->getDecomposedDecl())) 
{
----------------
vbvictor wrote:

What is the profit of using `dyn_cast_if_present` here?
`DecompositionDecl` may or may not be there, but the same rules apply to 
previous cast: `BindingDecl` also may or not be there. 

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

Reply via email to