================
@@ -627,9 +627,11 @@ CodeGenFunction::getJumpDestForLabel(const LabelDecl *D) {
   if (Dest.isValid()) return Dest;
 
   // Create, but don't insert, the new block.
+  // FIXME: We do not know `BranchInExprDepth` for the destination and 
currently
+  // emit *all* the BranchInExpr cleanups.
----------------
usx95 wrote:

I think we should remember/copy the entire `BranchInExpr` stack in a 
branch-fix-up and then emit the cleanups from this stored `BranchInExpr` stack 
up until the now-known destination depth.
This is because we simply pop the `BranchInExpr` stack on leaving an 
expression, but in this case, we need to remember which cleanups were popped 
earlier.

(This would not work if the goto destination is inside a different stmt-expr. 
In this case, the code is invalid anyways.)

https://github.com/llvm/llvm-project/pull/80698
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to