Sema type-checks a parsed translation unit: an interned type table, scopes
and symbols, declarations, statements and expressions, implicit and explicit
conversions, user-function overload resolution, and intrinsic / builtin
method matching driven by dxc's gen_intrin_main.txt (vendored, turned into a
Zig table at build time by tools/gen_intrinsics.zig).
Rules ported from dxc where it matters for exact agreement:
- operator result types (CombineBasicTypes, shift and bool rules)
- literal suffix types and diagnostics, including `1.#INF`
- declaration modifier validity and conflicts (DiagnoseHLSLDecl) and
row_major / column_major checks, using source-ordered qualifier words
- constant folding of asuint / max / min
- `_Static_assert`, `__decltype` and `std::is_same` builtins
(`static_assert` is an ordinary identifier in HLSL 2021)
Templates, operator overloading and bitfields report "not supported yet
(planned for milestone 0.2)".
Oracles:
- zig build oracle-sema: no false errors on the 1604 dxc-valid corpus
files (1537 clean, 67 need milestone 0.2 features)
- zig build oracle-verify: error-line agreement with dxc's SemaHLSL
-verify tests under HLSL 2021 (53% of expected error lines caught,
80 false error lines)
Also fixes the provenance commit of gen_intrin_main.txt (55a61aa79).