================
@@ -1416,6 +1424,12 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
 
   if (CGM.shouldEmitConvergenceTokens())
     ConvergenceTokenStack.pop_back();
+
+  if (ForBody) {
+    // Key Instructions: We want the for closing brace to be step-able on to
+    // match existing behaviour.
+    addInstToNewSourceAtom(ForBody->getTerminator(), nullptr);
----------------
jmorse wrote:

I feel that this works for the simple case, i.e. a for loop with a single block 
in it that is the body -- but what about the more complicated situation of more 
control flow in the for loop? Will the ForBody block have parts of that control 
flow in it?

If this is already handled (I imagine there's some abstraction in clang I'm 
unfamiliar with), testing for the correct behaviour would be good.

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

Reply via email to