[clang] [clang][Sema] Fix the continue and break scope for while loops (PR #152606)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 14 13:42:05 PDT 2025


ojhunt wrote:

> > > I was going to implement this approach as part of my named loops implementation, but adding a scope flag requires changing the underlying type of `ScopeFlags` to `uint64_t` at this point (because we already have 32 scope flags..., so I thought it’d be better to make that a separate patch.
> > 
> > 
> > @Sirraide If you're doing a much larger and more important change (zomg, labeled continue and break!!!!) I'm going to close this PR as it seems silly to fix this once, and then replace it.
> 
> Actually, the named loops implementation proper and this would be more or less orthogonal, so if you want to keep working on this feel free to; if not then I’ll take a look at it after named loops is merged (the only reason I don’t want to make it part of the named loops patch is because I’d have to fix a bunch of otherwise unrelated tests...).

I'm not super happy with the approach I took to codegen here so I'll keep this one closed and try to get back to it starting fresh this weekend or next week.

I really wish there was some way I could come up with to statically enforce that the Sema and codegen ideas of where the continue and break scopes are so I may give some thought to that first.

https://github.com/llvm/llvm-project/pull/152606


More information about the cfe-commits mailing list