[clang] [KeyInstr][Clang] For stmt atom (PR #134646)
Orlando Cazalet-Hyams via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 3 04:05:06 PDT 2025
================
@@ -1418,6 +1427,12 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
if (CGM.shouldEmitConvergenceTokens())
ConvergenceTokenStack.pop_back();
+
+ if (FinalBodyBB) {
+ // Key Instructions: We want the for closing brace to be step-able on to
+ // match existing behaviour.
----------------
OCHyams wrote:
> Does this mean that for brace-less for loops, we could theoretically step on the same last-line twice if there's a simple assignment and then a branch?
There could be two is_stmts there for the same line, yep (I think we discussed before that interpreting that is up to the debugger).
Added to test for additional coverage.
Updated comment.
https://github.com/llvm/llvm-project/pull/134646
More information about the cfe-commits
mailing list