Resolver: Check that initializers and assignments are valid

This performs very basic type verification for assignments and variable initializers.

Pulls part of the validation logic out of the Validator into the Resolver.
Involves fixing up a bunch of broken tests.

Bug: tint:642
Fixed: tint:631
Change-Id: Ifbdc139ff7eeab810856e0ba9e3c380c6555ec20
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45281
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-03-18 21:14:44 +00:00
committed by Commit Bot service account
parent 25eef8d2cf
commit 6b2fc057c5
15 changed files with 262 additions and 243 deletions

View File

@@ -169,6 +169,7 @@ source_set("tint_unittests_core_src") {
"../src/intrinsic_table_test.cc",
"../src/program_builder_test.cc",
"../src/program_test.cc",
"../src/resolver/assignment_validation_test.cc",
"../src/resolver/decoration_validation_test.cc",
"../src/resolver/host_shareable_validation_test.cc",
"../src/resolver/intrinsic_test.cc",