Trying to conform with #4009. Changes SemIR::LocIdAndInst construction to root out struct init cases with AddInst and related functions. I'm using templating of AddInst functions in order to avoid AddInst(loc_id, InstName{...}) and instead have AddInst<InstName>(loc_id, {...}) with I think similar readability results. There are a couple cases where inst construction is templated and so designated initializers couldn't be used, so this may be better for those in particular due to the extra type enforcement.
This probably doesn't clean up every last case, but I was trying to get the bulk at once without bleeding over into less related changes.
Trying to conform with #4009. Changes SemIR::LocIdAndInst construction to root out struct init cases with AddInst and related functions. I'm using templating of AddInst functions in order to avoid
AddInst(loc_id, InstName{...})
and instead haveAddInst<InstName>(loc_id, {...})
with I think similar readability results. There are a couple cases where inst construction is templated and so designated initializers couldn't be used, so this may be better for those in particular due to the extra type enforcement.This probably doesn't clean up every last case, but I was trying to get the bulk at once without bleeding over into less related changes.