---
generated: true
model: claude-opus-4-7
generated_at: 2026-05-21T00:00:00Z
source_commit: 1e0d460c1cb410005c4f775ba11fbc803cc8c16d
watched_paths_digest: 12add2d77eb534b6741b9633b4251590baf28be0de7f2554aacada789942f5ec
source_doc: docs/generated/design/ast-reference/statements.md
source_doc_digest: 18dc5b22d52dd6e4b69d2a6fd26470f083c80ab9ccd65073ee547bccc79af523
warning: "Auto-generated. May drift from source. Do not edit by hand."
---

# Tests for ast-reference/statements

## Intent
Tests verify the documented user-observable roles of the concrete
`Stmt` subclasses enumerated in
[`docs/generated/design/ast-reference/statements.md`](../../../design/ast-reference/statements.md):
`BlockStmt`, `SeqStmt`, `IfStmt`, `ForStmt`, `WhileStmt`, `DoWhileStmt`,
`SwitchStmt`, `CaseStmt`, `DefaultStmt`, `BreakStmt`, `ContinueStmt`,
`LabelStmt`, `ReturnStmt`, `DiscardStmt`, `DeferStmt`, `ThrowStmt`,
`CatchStmt`, `DeclStmt`, `ExpressionStmt`, `EmptyStmt`,
`RequireCapabilityStmt`, `TargetSwitchStmt`, `StageSwitchStmt`,
`TargetCaseStmt`, and `CompileTimeForStmt`.

The doc is fundamentally about the internal AST shape of these
classes (parent class in the C++ hierarchy, field names,
`uniqueID`/`targetOuterStmtID` linkage); the user-observable surface
is the **control-flow consequence** of the statement kind. Each test
picks one statement kind and writes the smallest piece of Slang that
exercises that role, with control-flow execution under `INTERPRET`
(or `COMPARE_COMPUTE -cpu` where the interpreter is incomplete) and
diagnostic emission for the ill-formed forms.

Sibling bundle `syntax-reference/keywords-and-builtins/` already
covers parser-side keyword recognition for `if`/`for`/`while`/
`break`/`return`/`switch`/`discard`/etc. The angle here is **AST-level
consequences**: block scoping, branch slot nullability, loop variable
scoping, label-resolution targeting, defer scope-exit ordering, throw/
catch flow, target/stage switch resolution, compile-time-for
unrolling.

Internal AST shape claims (parent class in the C++ hierarchy, private
field names, `uniqueID` identity, synthesized-only classes that have
no user spelling) are recorded under `## Untested claims` because they
are unobservable through any allowed `slang-test` directive.


## Functional coverage
| Claim | Intent | Anchor | Tests |
| --- | --- | --- | --- |
| A BlockStmt containing a single statement executes that statement and introduces a scope; a local declared inside is not visible after the block closes. | boundary | [#blockstmt-and-seqstmt](../../../design/ast-reference/statements.md#blockstmt-and-seqstmt) | [`blockstmt-single-statement.slang`](blockstmt-single-statement.slang) |
| A BlockStmt is a ScopeStmt; a local declared inside `{ ... }` is not visible outside the block, so a same-named outer variable retains its outer value after the block closes. | functional | [#blockstmt-and-seqstmt](../../../design/ast-reference/statements.md#blockstmt-and-seqstmt) | [`blockstmt-introduces-scope.slang`](blockstmt-introduces-scope.slang) |
| A SeqStmt bundles several statements where a single Stmt slot is required; the canonical surface form is multiple declarators in one declaration (`int a, b;`) used in statement position. | functional | [#blockstmt-and-seqstmt](../../../design/ast-reference/statements.md#blockstmt-and-seqstmt) | [`seqstmt-multi-declarator.slang`](seqstmt-multi-declarator.slang) |
| A deeply nested chain of BlockStmts (>=5 levels) each introducing its own scope still resolves shadowed names to the innermost binding; the outermost variable is preserved. | stress | [#blockstmt-and-seqstmt](../../../design/ast-reference/statements.md#blockstmt-and-seqstmt) | [`blockstmt-deeply-nested-stress.slang`](blockstmt-deeply-nested-stress.slang) |
| An empty BlockStmt `{}` is accepted in statement position and has no observable effect; the surrounding state is preserved across the block. | boundary | [#blockstmt-and-seqstmt](../../../design/ast-reference/statements.md#blockstmt-and-seqstmt) | [`blockstmt-empty.slang`](blockstmt-empty.slang) |
| A CompileTimeForStmt iterates a compile-time-constant range and is unrolled at compile time; the body executes once per iteration with the loop variable bound to a compile-time constant. | functional | [#compiletimeforstmt](../../../design/ast-reference/statements.md#compiletimeforstmt) | [`compiletimefor-unrolls.slang`](compiletimefor-unrolls.slang) |
| A CompileTimeForStmt over a 32-element range unrolls to 32 copies of the body; the summed loop-variable values match the closed-form 0+1+...+31 = 496. | stress | [#compiletimeforstmt](../../../design/ast-reference/statements.md#compiletimeforstmt) | [`compiletimefor-large-range-stress.slang`](compiletimefor-large-range-stress.slang) |
| A CompileTimeForStmt with a zero-length range (`$for(i in Range(0))`) unrolls to zero copies of the body; the surrounding accumulator is unchanged by the unrolled-no-times loop. | boundary | [#compiletimeforstmt](../../../design/ast-reference/statements.md#compiletimeforstmt) | [`compiletimefor-zero-range.slang`](compiletimefor-zero-range.slang) |
| A DeclStmt is a `DeclBase` used in statement position; the canonical use is a local variable declaration whose name is visible to subsequent statements in the same block. | functional | [#declstmt-and-expressionstmt](../../../design/ast-reference/statements.md#declstmt-and-expressionstmt) | [`declstmt-local-visible-later.slang`](declstmt-local-visible-later.slang) |
| An ExpressionStmt holds an arbitrary `Expr` used for its side effects; the value of the expression is computed and discarded, and any side effects (function call, assignment) are observed. | functional | [#declstmt-and-expressionstmt](../../../design/ast-reference/statements.md#declstmt-and-expressionstmt) | [`expressionstmt-side-effect.slang`](expressionstmt-side-effect.slang) |
| A DeferStmt enqueues its inner statement to run when the enclosing scope exits; the deferred side effect is observed after the surrounding scope's other statements complete. | functional | [#deferstmt](../../../design/ast-reference/statements.md#deferstmt) | [`deferstmt-scope-exit-order.slang`](deferstmt-scope-exit-order.slang) |
| A DeferStmt placed at function entry has the entire function body as its surrounding scope; the deferred inner statement runs after every other statement in the function but before the caller resumes. | boundary | [#deferstmt](../../../design/ast-reference/statements.md#deferstmt) | [`deferstmt-at-function-entry.slang`](deferstmt-at-function-entry.slang) |
| A DeferStmt's inner statement runs even when the enclosing scope exits via early `return`; the IR pipeline materializes it as a scope-exit handler reached on every control-flow path. | functional | [#deferstmt](../../../design/ast-reference/statements.md#deferstmt) | [`deferstmt-runs-on-early-return.slang`](deferstmt-runs-on-early-return.slang) |
| Multiple DeferStmt inner statements enqueued in a single scope run on scope exit; the deferred prints land after the surrounding body's prints. | boundary | [#deferstmt](../../../design/ast-reference/statements.md#deferstmt) | [`deferstmt-multiple-lifo-order.slang`](deferstmt-multiple-lifo-order.slang) |
| A 5-arm if/else-if/else-if/else-if/else chain (nested IfStmts in each negativeStatement slot) dispatches to exactly the matching arm; later arms do not fire and the final else handles the unmatched fallback. | stress | [#ifstmt](../../../design/ast-reference/statements.md#ifstmt) | [`ifstmt-elseif-chain-stress.slang`](ifstmt-elseif-chain-stress.slang) |
| An IfStmt evaluates its predicate Expr exactly once per execution of the statement; a side-effecting predicate's effect is observed exactly once, regardless of which branch is selected. | boundary | [#ifstmt](../../../design/ast-reference/statements.md#ifstmt) | [`ifstmt-predicate-evaluated-once.slang`](ifstmt-predicate-evaluated-once.slang) |
| An IfStmt holds predicate, positive and negative statements; only the branch matching the predicate is executed, and the unchosen branch's side effects are not observed. | functional | [#ifstmt](../../../design/ast-reference/statements.md#ifstmt) | [`ifstmt-else-branch.slang`](ifstmt-else-branch.slang) |
| An IfStmt's negativeStatement slot is null for an `if` without an `else`; when the predicate is false the program continues with no side effects from the missing else branch. | functional | [#ifstmt](../../../design/ast-reference/statements.md#ifstmt) | [`ifstmt-no-else-noop.slang`](ifstmt-no-else-noop.slang) |
| A LabelStmt attaches a label token to an inner statement; a `BreakStmt` with a matching `targetLabel` breaks out of the labeled (non-innermost) loop rather than the innermost one. | functional | [#labelstmt-and-breakstmttargetlabel](../../../design/ast-reference/statements.md#labelstmt-and-breakstmttargetlabel) | [`labelstmt-labeled-break.slang`](labelstmt-labeled-break.slang) |
| A DoWhileStmt tests its predicate after each iteration; the body executes at least once even when the predicate is false at entry. | functional | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`dowhilestmt-runs-once.slang`](dowhilestmt-runs-once.slang) |
| A ForStmt is a ScopeStmt; the loop variable introduced by `initialStatement` is scoped to the body and does not leak into the surrounding scope. | functional | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`forstmt-variable-scoped.slang`](forstmt-variable-scoped.slang) |
| A ForStmt iterated 100 times accumulates the documented count; the loop variable advances monotonically and the side-effect expression runs once per iteration. | stress | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`forstmt-many-iterations-stress.slang`](forstmt-many-iterations-stress.slang) |
| A ForStmt whose predicate is true exactly once executes the body exactly once and then exits; both initialStatement and sideEffectExpression run before the predicate fails on the second test. | boundary | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`forstmt-one-iteration.slang`](forstmt-one-iteration.slang) |
| A ForStmt whose predicateExpression is false at entry executes zero iterations; the loop body does not run at all. | boundary | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`forstmt-zero-iterations.slang`](forstmt-zero-iterations.slang) |
| A ForStmt with empty predicateExpression and empty sideEffectExpression (`for (init; ; )`) loops indefinitely; a body-internal break terminates it after the documented number of iterations. | boundary | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`forstmt-init-only-with-break.slang`](forstmt-init-only-with-break.slang) |
| A WhileStmt tests its predicate before each iteration; when the predicate is false at entry the body does not execute at all. | functional | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`whilestmt-skips-zero-iterations.slang`](whilestmt-skips-zero-iterations.slang) |
| A WhileStmt with a constant-true predicate iterates indefinitely; a body-internal BreakStmt terminates the LoopStmt at the documented iteration. | boundary | [#loop-family](../../../design/ast-reference/statements.md#loop-family) | [`whilestmt-true-with-break.slang`](whilestmt-true-with-break.slang) |
| A BreakStmt is a ChildStmt whose target must be an enclosing BreakableStmt (loop or switch); used outside any such enclosing statement it is rejected. | negative | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`breakstmt-outside-loop-rejected.slang`](breakstmt-outside-loop-rejected.slang) |
| A ContinueStmt is a ChildStmt whose target must be an enclosing LoopStmt; used outside any loop the checker rejects it because no matching enclosing loop exists. | negative | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`continuestmt-outside-loop-rejected.slang`](continuestmt-outside-loop-rejected.slang) |
| A ContinueStmt skips the remainder of the current iteration and advances to the next; statements after the `continue` are not executed for that iteration. | functional | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`continuestmt-skips-rest-of-iteration.slang`](continuestmt-skips-rest-of-iteration.slang) |
| A DiscardStmt is a fragment-shader pixel-kill construct; using `discard` from a non-fragment entry point is rejected as an unavailable feature for that stage. | negative | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`discardstmt-non-fragment-rejected.slang`](discardstmt-non-fragment-rejected.slang) |
| A ReturnStmt in a non-void function is required to carry an expression; `return;` is rejected with `'return' should have an expression`. | negative | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`returnstmt-missing-expression-rejected.slang`](returnstmt-missing-expression-rejected.slang) |
| A ReturnStmt in a void function is allowed to omit its expression (`return;`); the function halts and statements after the bare return do not execute on the early-return path. | boundary | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`returnstmt-void-bare.slang`](returnstmt-void-bare.slang) |
| A ReturnStmt taken inside a loop body halts the entire function; the remaining iterations of the loop and all statements after the loop do not execute. | boundary | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`returnstmt-inside-loop.slang`](returnstmt-inside-loop.slang) |
| A ReturnStmt yields a value and halts the function; statements after a taken return are not executed. | functional | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`returnstmt-halts-function.slang`](returnstmt-halts-function.slang) |
| An EmptyStmt is a bare `;` accepted in statement position; it carries no state and produces no effect. | functional | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`emptystmt-bare-semicolon.slang`](emptystmt-bare-semicolon.slang) |
| An unlabeled BreakStmt exits the innermost enclosing BreakableStmt; the outer loop continues its remaining iterations. | functional | [#nodes](../../../design/ast-reference/statements.md#nodes) | [`breakstmt-exits-innermost-loop.slang`](breakstmt-exits-innermost-loop.slang) |
| A RequireCapabilityStmt is a statement-level capability assertion (`__requireCapability(...)`) scoped to the enclosing function; the function compiles when the target capability set satisfies the listed atoms. | functional | [#requirecapabilitystmt](../../../design/ast-reference/statements.md#requirecapabilitystmt) | [`requirecapability-in-function.slang`](requirecapability-in-function.slang) |
| A BreakStmt nested inside a SwitchStmt targets the enclosing SwitchStmt (a BreakableStmt) and not any surrounding loop; control returns to the statement after the switch and the surrounding loop continues. | boundary | [#switchstmt-casestmt-defaultstmt](../../../design/ast-reference/statements.md#switchstmt-casestmt-defaultstmt) | [`breakstmt-from-switch.slang`](breakstmt-from-switch.slang) |
| A CaseStmt is "just a marker" that slices the switch body into per-case blocks; an empty case body followed by another case is a fall-through, observable in the emitted text as the two case labels share the next statement block. | functional | [#switchstmt-casestmt-defaultstmt](../../../design/ast-reference/statements.md#switchstmt-casestmt-defaultstmt) | [`switchstmt-fall-through.slang`](switchstmt-fall-through.slang) |
| A SwitchStmt dispatches to the matching CaseStmt; the case labels slice the body into per-case blocks, and a `BreakStmt` returns control to the statement after the switch. | functional | [#switchstmt-casestmt-defaultstmt](../../../design/ast-reference/statements.md#switchstmt-casestmt-defaultstmt) | [`switchstmt-case-dispatch.slang`](switchstmt-case-dispatch.slang) |
| A SwitchStmt whose body contains only a `default:` marker (no CaseStmt) dispatches every condition value to the default body; the documented "marker-slicing" of the body still works at the lower edge of one section. | boundary | [#switchstmt-casestmt-defaultstmt](../../../design/ast-reference/statements.md#switchstmt-casestmt-defaultstmt) | [`switchstmt-default-only.slang`](switchstmt-default-only.slang) |
| A SwitchStmt without a DefaultStmt slices the body into per-case blocks only; an unmatched condition value passes through without entering any case body. | boundary | [#switchstmt-casestmt-defaultstmt](../../../design/ast-reference/statements.md#switchstmt-casestmt-defaultstmt) | [`switchstmt-no-default.slang`](switchstmt-no-default.slang) |
| A StageSwitchStmt dispatches statically by pipeline stage; only the case body whose label matches the entry point's stage survives in the emitted code, and the other cases are resolved away. | functional | [#targetswitchstmt-stageswitchstmt-targetcasestmt](../../../design/ast-reference/statements.md#targetswitchstmt-stageswitchstmt-targetcasestmt) | [`stageswitch-static-dispatch.slang`](stageswitch-static-dispatch.slang) |
| A TargetSwitchStmt is "a static dispatch chosen at compile time by matching capabilities"; compiling for a target that does not match any TargetCaseStmt selects the `default` body and the unmatched case bodies are resolved away. | functional | [#targetswitchstmt-stageswitchstmt-targetcasestmt](../../../design/ast-reference/statements.md#targetswitchstmt-stageswitchstmt-targetcasestmt) | [`targetswitch-static-dispatch.slang`](targetswitch-static-dispatch.slang) |
| A CatchStmt with a null `errorVar` is a catch-all that does not bind the error value; it catches errors of any type from the protected body. | functional | [#throwstmt-and-catchstmt](../../../design/ast-reference/statements.md#throwstmt-and-catchstmt) | [`catchstmt-catch-all.slang`](catchstmt-catch-all.slang) |
| A ThrowStmt in an errorable function transfers control to the caller's matching CatchStmt; the catch handler runs and the protected body's remaining statements are skipped. | functional | [#throwstmt-and-catchstmt](../../../design/ast-reference/statements.md#throwstmt-and-catchstmt) | [`throw-catch-handler-runs.slang`](throw-catch-handler-runs.slang) |
| A ThrowStmt is only valid inside a function declared to throw the matching error type; an uncaught `throw` in a non-throwing function is rejected. | negative | [#throwstmt-and-catchstmt](../../../design/ast-reference/statements.md#throwstmt-and-catchstmt) | [`throwstmt-without-throws-rejected.slang`](throwstmt-without-throws-rejected.slang) |
| A ThrowStmt's `expression` Expr is transferred to the matching CatchStmt's `errorVar` ParamDecl; the handler observes the originally thrown enum value distinctly across distinct enum members. | boundary | [#throwstmt-and-catchstmt](../../../design/ast-reference/statements.md#throwstmt-and-catchstmt) | [`throwstmt-enum-value-preserved.slang`](throwstmt-enum-value-preserved.slang) |
| Nested CatchStmt blocks resolve to the innermost matching handler; a throw inside an inner try is caught by the inner handler and the outer handler does not fire. | boundary | [#throwstmt-and-catchstmt](../../../design/ast-reference/statements.md#throwstmt-and-catchstmt) | [`catchstmt-nested-try.slang`](catchstmt-nested-try.slang) |


## Untested claims
| Claim | Reason | Anchor | Why untested |
| --- | --- | --- | --- |
| The `BreakableStmt::uniqueID` and `ChildStmt::targetOuterStmtID` linkage. The user-visible consequence (a break/continue targets the right enclosing statement) is tested; the field-level identity is not. | (unclassified) | (unspecified) | Reason and explanation to be refined by the next regeneration. |
| `CompileTimeForStmt`'s `rangeBeginVal`/`rangeEndVal` as `IntVal*` filled in by checking — only the unrolled-body behavior is observable. | (unclassified) | [#compiletimeforstmt](../../../design/ast-reference/statements.md#compiletimeforstmt) | Reason and explanation to be refined by the next regeneration. |
| Statement kinds with no user-spellable form on the `.slang` source surface this bundle can exercise: - `IntrinsicAsmStmt` — used only by core-module intrinsics. - `UnparsedStmt` — reserved content deferred to a downstream compiler (e.g. inline HLSL); not reachable from a `.slang` source file via the `slang-test` directives this bundle uses. - `GpuForeachStmt` — the host-side `__GPU_FOREACH` grammar is not exercised by the agentic suite. - `UnscopedForStmt` — only produced when the parser is in HLSL source-language mode; not reachable from a `.slang` file (see doc gap above). | (unclassified) | [#intrinsicasmstmt](../../../design/ast-reference/statements.md#intrinsicasmstmt) | Reason and explanation to be refined by the next regeneration. |
| `LabelStmt` on a non-loop, non-switch target. The doc only mentions labels on "enclosing labeled loop or switch", so other labelings (e.g. on a block) are an unstated claim. | (unclassified) | [#labelstmt](../../../design/ast-reference/statements.md#labelstmt) | Reason and explanation to be refined by the next regeneration. |
| The `## Family hierarchy` mermaid diagram as a graph: abstract intermediates (`ScopeStmt`, `BreakableStmt`, `LoopStmt`, `ChildStmt`, `JumpStmt`, `CaseStmtBase`) carry no FIDDLE concrete tag and produce no user spelling of their own. | (unclassified) | [#scopestmt](../../../design/ast-reference/statements.md#scopestmt) | Reason and explanation to be refined by the next regeneration. |
| `UniqueStmtIDNode` (declared as a `Decl` subclass for serialization convenience, "not parsed as a statement"). | (unclassified) | [#uniquestmtidnode](../../../design/ast-reference/statements.md#uniquestmtidnode) | Reason and explanation to be refined by the next regeneration. |
| IR-lowering side claims that the doc cross-links to `../pipeline/04-ast-to-ir.md` (defer materialization as scope-exit handlers, target-switch resolution, compile-time-for unrolling at the IR level). The IR-level behavior is tested in `ir-reference/control-flow/`; here we observe the source-level consequence only. | compile-time-toggle | (unspecified) | Preprocessor define or build-time flag baked into the binary; not observable at runtime. |
| The grammar production a parser callback is named (e.g. `parseTargetSwitchStmtImpl`, `parseCompileTimeForStmt`, `ParseDeferStatement`, `ParseRequireCapabilityStatement`). | internal-source-fact | [#parsetargetswitchstmtimpl](../../../design/ast-reference/statements.md#parsetargetswitchstmtimpl) | Implementation detail (C++ class hierarchy, field names, parser-callback names) with no user-observable consequence. |
| Field names listed in the `## Nodes` table (e.g. `IfStmt::predicate`, `IfStmt::positiveStatement`, `IfStmt::negativeStatement`, `IfStmt::afterLoc`, `ForStmt::initialStatement`, `ForStmt::predicateExpression`, `ForStmt::sideEffectExpression`, `ForStmt::statement`, `WhileStmt::predicate`/`statement`, `DoWhileStmt::predicate`/ `statement`, `SwitchStmt::condition`/`body`, `CaseStmt::expr`/`exprVal`, `BreakStmt::targetLabel`, `ReturnStmt::expression`, `BlockStmt::body`/`closingSourceLoc`, `LabelStmt::label`/`innerStmt`, `DeclStmt::decl`, `ExpressionStmt::expression`, `DeferStmt::statement`, `ThrowStmt::expression`, `CatchStmt::errorVar`/`tryBody`/ `handleBody`, `RequireCapabilityStmt::requiredCaps`, `TargetCaseStmt::capability`/`capabilityToken`/`body`, `CompileTimeForStmt::varDecl`/`rangeBeginExpr`/`rangeEndExpr`/ `rangeBeginVal`/`rangeEndVal`/`body`). | internal-source-fact | [#statement](../../../design/ast-reference/statements.md#statement) | Implementation detail (C++ class hierarchy, field names, parser-callback names) with no user-observable consequence. |
| The C++ parent class of any concrete `Stmt` (e.g. that `BlockStmt extends ScopeStmt`, that `ForStmt`/`WhileStmt`/ `DoWhileStmt` all extend `LoopStmt`, that `JumpStmt extends ChildStmt`). | internal-source-fact | [#stmt](../../../design/ast-reference/statements.md#stmt) | Only the user-observable control-flow behavior is testable. |


## Doc gaps observed
| Anchor | Kind | Gap | Suggested addition |
| --- | --- | --- | --- |
| [#nodes](../../../design/ast-reference/statements.md#nodes) | undocumented-behavior | The `UnscopedForStmt` row in `## Nodes` documents the compatibility form "where the loop variable leaks into the surrounding scope", but the parser produces an `UnscopedForStmt` only when the source-language detection sets `SourceLanguage::HLSL`. A `.slang` source file (the only kind `slang-test` exercises with the `INTERPRET` directive) always parses as Slang and never reaches the `UnscopedForStmt` path. The doc could clarify that `UnscopedForStmt` is reachable only from HLSL input and not via a user-spellable `.slang` modifier; without that pointer an agent cannot anchor a test here. |  |
| [#statement-level-keyword-is-requirecapability](../../../design/ast-reference/statements.md#statement-level-keyword-is-requirecapability) | undocumented-behavior | `RequireCapabilityStmt` is documented as a statement-level capability requirement, but the doc does not state which spelling produces it (`__requireCapability` is the parser token, while the module-scope `RequireCapabilityDecl` is `__require_capability`). | A one-line note ("statement-level keyword is `__requireCapability`") would let the bundle's test anchor more directly than the current prose paragraph. |
| [#breakstmt-inside-a-switchstmt-is-matched-via-breakablestmtuniqueid](../../../design/ast-reference/statements.md#breakstmt-inside-a-switchstmt-is-matched-via-breakablestmtuniqueid) | undocumented-behavior | The doc says "BreakStmt inside a SwitchStmt is matched via BreakableStmt::uniqueID" but does not state the user-observable consequence (that a labeled `break` can break out of a non- innermost switch as well as a non-innermost loop). The bundle exercises the labeled-loop case; the labeled-switch case is symmetric but has no separate doc claim and so no separate test. |  |
| [#used-by-core-module-intrinsics](../../../design/ast-reference/statements.md#used-by-core-module-intrinsics) | undocumented-behavior | The doc lists `IntrinsicAsmStmt` as a node but notes it is "used by core-module intrinsics"; it has no user spelling. The same applies to `UnparsedStmt` ("reserved-content block deferred to a downstream compiler"). One line ("not user-spellable, exists only inside the core module / inline-HLSL paths") would let an agent skip these without doubt. |  |
| [#that-childstmts-reference-via-targetouterstmtid](../../../design/ast-reference/statements.md#that-childstmts-reference-via-targetouterstmtid) | undocumented-behavior | The doc says `BreakableStmt` has a `uniqueID` "that `ChildStmt`s reference via `targetOuterStmtID`", and that `UniqueStmtIDNode` is "declared in this header as a `Decl` subclass for serialization convenience". The user-facing consequence is the matching of a `break` to its enclosing breakable, which we test indirectly via the labeled-break test; the `uniqueID` mechanism itself is internal and not separately observable. |  |
| [#statements](../../../design/ast-reference/statements.md#statements) | undocumented-behavior | The doc points to `../syntax-reference/grammar.md#statements` for the grammar of each statement form, and to `../pipeline/04-ast-to-ir.md` for the IR lowering of `DeferStmt`, `ThrowStmt`, `CompileTimeForStmt`, and `TargetSwitchStmt`. The bundle exercises the AST-level consequence of each; the IR-side claims belong to `ir-reference/control-flow/`. |  |
