In C++ we are not allowed to use designated initializers to initialize fields out of order. In some cases when diagnosing this we are crashing because we are not indexing correctly and therefore going out of bounds.
This fixes: https://github.com/llvm/llvm-project/issues/63605
I think this is probably where it fails produce something sensible to diagnostics.
in the *NextField == RD->field_end() case we just go straight to the end.
In that case, we probably want to break when the previous element is the one under test, that way you might get to b.