akash-manna-sky wrote:

> I don’t think referring to `__begin` is actually that big of an issue: the 
> standard basically says that a ranged-for loop is syntactic sugar that 
> expands to a declaration of `begin` + a declaration of `end` + a `for` loop 
> etc. so if you see a diagnostic about a variable named `__begin` in the 
> context of range-based for loops, it shouldn’t be too hard to figure out what 
> that refers to.
> 


Went with your alternative: a single note, 'begin' variable of range-based 
'for' loop is not a constant expression, pointed at the loop it belongs to — 
the synthesized variable already carries the loop's location, so nested loops 
are told apart without any extra machinery. 

One thing: PR description need to updated according my new implementation. 

https://github.com/llvm/llvm-project/pull/218145
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to