Clarify and partially enforce inst-order precondition on splicing (#6722)

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
Geoff RomerandChandler Carruth authored and GitHub committed 2026-02-14 01:40:51 +00:00
1 parent 64e3fab43a
commit f289592dfa
4 files changed
+20 -2

No files matched your search

@@ -160,6 +160,9 @@ auto HandleParseNode(Context& context, Parse::ForHeaderId node_id) -> bool {
// Create the cursor variable.
// TODO: Produce a custom diagnostic if the range operand can't be used as a
// range.
// TODO: We need to allocate the `VarStorage` before building the operator.
// The current order risks violating the preconditions on `Initialize` and
// risks violating the topological ordering of insts.
auto cursor_id =
BuildUnaryOperator(context, node_id,
{.interface_name = CoreIdentifier::Iterate,