Move struct validation from Validator to Resolver

* Moved Validator::ValidateConstructedType, which only validated
structs, to Resolver as ValidateStructure.
* Moved relevant tests to new files, and also updated all failing tests
to validate Source location.
* Fixed other tests that broke now that we're validating structs.

Bug: tint:642
Change-Id: Iefc08ef548f52d8c3798d814d2183c56d1236c2d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45160
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Antonio Maiorano
2021-03-18 17:59:54 +00:00
committed by Commit Bot service account
parent e072465d83
commit 9970ec63ca
16 changed files with 497 additions and 322 deletions

View File

@@ -535,6 +535,7 @@ TEST_F(BoundArrayAccessorsTest, DISABLED_Matrix_Row_Constant_Id_Clamps) {
TEST_F(BoundArrayAccessorsTest, RuntimeArray_Clamps) {
auto* src = R"(
[[block]]
struct S {
a : f32;
b : array<f32>;
@@ -547,6 +548,7 @@ fn f() -> void {
)";
auto* expect = R"(
[[block]]
struct S {
a : f32;
b : array<f32>;