https://github.com/AlexVlx commented:
> A side question, is it legal to use the builtin in unstructured control flow, > like here: https://godbolt.org/z/no7Kzv19r ? Note, if the answer is "no", > then enforcing the builtin to initialize something would (probably) > automatically prevent this case, as clang would error out with: > ``` > error: cannot jump from this goto statement to its label > note: jump bypasses variable initialization > ``` Many thanks for asking this, I had completely ignored this scenario! I've added handling for this which is symmetric with what we already do for `if constexpr` or `if available`; indeed, the answer to your question was "no":) https://github.com/llvm/llvm-project/pull/134016 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits