Sirraide wrote:

> but for some reason it fails to emit the _"this use of statement expressions 
> is not supported..."_ note alongside the error.

@Expertcoderz The fact that we don’t support break/return/continue inside of a 
statement expression is purely a limitation of the old constant evaluator 
(because the function that evaluates a statement expression returns a `bool` 
rather than an `EvalStmtResult`). I wouldn’t be surprised if the new constant 
interpreter simply didn’t have this issue, so it’s fine if it accepts 
break/continue/return in a statement expression provided that it’s valid

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

Reply via email to