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:
parent
33c13c6e28
commit
c73b57f2c6
|
@ -294,7 +294,7 @@ TEST_F(ResolverAssignmentValidationTest, AssignNonConstructible_RuntimeArray) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverAssignmentValidationTest,
|
TEST_F(ResolverAssignmentValidationTest,
|
||||||
AssignToPhony_NonConstructableStruct_Fail) {
|
AssignToPhony_NonConstructibleStruct_Fail) {
|
||||||
// [[block]]
|
// [[block]]
|
||||||
// struct S {
|
// struct S {
|
||||||
// arr: array<i32>;
|
// arr: array<i32>;
|
||||||
|
@ -311,7 +311,7 @@ TEST_F(ResolverAssignmentValidationTest,
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 error: cannot assign 'S' to '_'. "
|
"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");
|
"sampler type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ TEST_F(ResolverAssignmentValidationTest, AssignToPhony_DynamicArray_Fail) {
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
r()->error(),
|
r()->error(),
|
||||||
"12:34 error: cannot assign 'ref<storage, array<i32>, read>' to '_'. "
|
"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");
|
"type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4433,7 +4433,7 @@ bool Resolver::ValidateAssignment(const ast::AssignmentStatement* a) {
|
||||||
!ty->IsAnyOf<sem::Pointer, sem::Texture, sem::Sampler>()) {
|
!ty->IsAnyOf<sem::Pointer, sem::Texture, sem::Sampler>()) {
|
||||||
AddError(
|
AddError(
|
||||||
"cannot assign '" + TypeNameOf(a->rhs) +
|
"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",
|
"texture or sampler type",
|
||||||
a->rhs->source);
|
a->rhs->source);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -146,7 +146,7 @@ SanitizedResult Sanitize(const Program* in,
|
||||||
// * Simplify, as we need to fold away the address-of and dereferences of
|
// * Simplify, as we need to fold away the address-of and dereferences of
|
||||||
// `*(&(intrinsic_load()))` expressions.
|
// `*(&(intrinsic_load()))` expressions.
|
||||||
// * RemovePhonies, as phonies can be assigned a pointer to a
|
// * 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>();
|
manager.Add<transform::DecomposeMemoryAccess>();
|
||||||
// CalculateArrayLength must come after DecomposeMemoryAccess, as
|
// CalculateArrayLength must come after DecomposeMemoryAccess, as
|
||||||
// DecomposeMemoryAccess special-cases the arrayLength() intrinsic, which
|
// DecomposeMemoryAccess special-cases the arrayLength() intrinsic, which
|
||||||
|
|
|
@ -307,6 +307,7 @@ tint_unittests_source_set("tint_unittests_core_src") {
|
||||||
"../src/transform/num_workgroups_from_uniform_test.cc",
|
"../src/transform/num_workgroups_from_uniform_test.cc",
|
||||||
"../src/transform/pad_array_elements_test.cc",
|
"../src/transform/pad_array_elements_test.cc",
|
||||||
"../src/transform/promote_initializers_to_const_var_test.cc",
|
"../src/transform/promote_initializers_to_const_var_test.cc",
|
||||||
|
"../src/transform/remove_phonies_test.cc",
|
||||||
"../src/transform/renamer_test.cc",
|
"../src/transform/renamer_test.cc",
|
||||||
"../src/transform/robustness_test.cc",
|
"../src/transform/robustness_test.cc",
|
||||||
"../src/transform/simplify_test.cc",
|
"../src/transform/simplify_test.cc",
|
||||||
|
|
Loading…
Reference in New Issue