Address late review comments from 67064

Use spec-spelling of 'constructible'.
Add missing test file to 'test/BUILD.gn'

See https://dawn-review.googlesource.com/c/tint/+/67064

Change-Id: Ie39773617fd0a363d63cc6449bf3905c9eb6786d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67380
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton 2021-10-25 14:26:55 +00:00 committed by Tint LUCI CQ
parent 33c13c6e28
commit c73b57f2c6
4 changed files with 6 additions and 5 deletions

View File

@ -294,7 +294,7 @@ TEST_F(ResolverAssignmentValidationTest, AssignNonConstructible_RuntimeArray) {
}
TEST_F(ResolverAssignmentValidationTest,
AssignToPhony_NonConstructableStruct_Fail) {
AssignToPhony_NonConstructibleStruct_Fail) {
// [[block]]
// struct S {
// arr: array<i32>;
@ -311,7 +311,7 @@ TEST_F(ResolverAssignmentValidationTest,
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 error: cannot assign 'S' to '_'. "
"'_' can only be assigned a constructable, pointer, texture or "
"'_' can only be assigned a constructible, pointer, texture or "
"sampler type");
}
@ -333,7 +333,7 @@ TEST_F(ResolverAssignmentValidationTest, AssignToPhony_DynamicArray_Fail) {
EXPECT_EQ(
r()->error(),
"12:34 error: cannot assign 'ref<storage, array<i32>, read>' to '_'. "
"'_' can only be assigned a constructable, pointer, texture or sampler "
"'_' can only be assigned a constructible, pointer, texture or sampler "
"type");
}

View File

@ -4433,7 +4433,7 @@ bool Resolver::ValidateAssignment(const ast::AssignmentStatement* a) {
!ty->IsAnyOf<sem::Pointer, sem::Texture, sem::Sampler>()) {
AddError(
"cannot assign '" + TypeNameOf(a->rhs) +
"' to '_'. '_' can only be assigned a constructable, pointer, "
"' to '_'. '_' can only be assigned a constructible, pointer, "
"texture or sampler type",
a->rhs->source);
return false;

View File

@ -146,7 +146,7 @@ SanitizedResult Sanitize(const Program* in,
// * Simplify, as we need to fold away the address-of and dereferences of
// `*(&(intrinsic_load()))` expressions.
// * RemovePhonies, as phonies can be assigned a pointer to a
// non-constructable buffer, or dynamic array, which DMA cannot cope with.
// non-constructible buffer, or dynamic array, which DMA cannot cope with.
manager.Add<transform::DecomposeMemoryAccess>();
// CalculateArrayLength must come after DecomposeMemoryAccess, as
// DecomposeMemoryAccess special-cases the arrayLength() intrinsic, which

View File

@ -307,6 +307,7 @@ tint_unittests_source_set("tint_unittests_core_src") {
"../src/transform/num_workgroups_from_uniform_test.cc",
"../src/transform/pad_array_elements_test.cc",
"../src/transform/promote_initializers_to_const_var_test.cc",
"../src/transform/remove_phonies_test.cc",
"../src/transform/renamer_test.cc",
"../src/transform/robustness_test.cc",
"../src/transform/simplify_test.cc",