File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -72,15 +72,17 @@ bool LiveVariables::LivenessValues::isLive(const Expr *E) const {
7272
7373bool LiveVariables::LivenessValues::isLive (const VarDecl *D) const {
7474 if (const auto *DD = dyn_cast<DecompositionDecl>(D)) {
75- bool alive = false ;
76- for (const BindingDecl *BD : DD->bindings ())
77- alive |= liveBindings.contains (BD);
78-
7975 // Note: the only known case this condition is necessary, is when a bindig
8076 // to a tuple-like structure is created. The HoldingVar initializers have a
8177 // DeclRefExpr to the DecompositionDecl.
82- alive |= liveDecls.contains (DD);
83- return alive;
78+ if (liveDecls.contains (DD))
79+ return true ;
80+
81+ for (const BindingDecl *BD : DD->bindings ()) {
82+ if (liveBindings.contains (BD))
83+ return true ;
84+ }
85+ return false ;
8486 }
8587 return liveDecls.contains (D);
8688}
You can’t perform that action at this time.
0 commit comments