writer/msl: Fix ignore() test validation failure
Functions cannot be called main, and we do not run the rename reserved keywords transform as part of the sanitizer. Change-Id: Iea67fe08c7e94e473d622b7f349caf8d09f41784 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54101 Auto-Submit: James Price <jrprice@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
3832b8e05d
commit
5b2f49b5df
|
@ -346,7 +346,7 @@ TEST_F(MslGeneratorImplTest, Ignore) {
|
||||||
Func("f", {Param("a", ty.i32()), Param("b", ty.i32()), Param("c", ty.i32())},
|
Func("f", {Param("a", ty.i32()), Param("b", ty.i32()), Param("c", ty.i32())},
|
||||||
ty.i32(), {Return(Mul(Add("a", "b"), "c"))});
|
ty.i32(), {Return(Mul(Add("a", "b"), "c"))});
|
||||||
|
|
||||||
Func("main", {}, ty.void_(),
|
Func("func", {}, ty.void_(),
|
||||||
{create<ast::CallStatement>(Call("ignore", Call("f", 1, 2, 3)))},
|
{create<ast::CallStatement>(Call("ignore", Call("f", 1, 2, 3)))},
|
||||||
{Stage(ast::PipelineStage::kCompute)});
|
{Stage(ast::PipelineStage::kCompute)});
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ int f(int a, int b, int c) {
|
||||||
return ((a + b) * c);
|
return ((a + b) * c);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void main() {
|
kernel void func() {
|
||||||
(void) f(1, 2, 3);
|
(void) f(1, 2, 3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue