Ben Clayton b549b3051e tint: Validate @must_use on functions and builtins
Fixed: tint:1844
Change-Id: I812dd338925c1dccaa3029a46e10a0ea34a8ed54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120960
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-02-22 16:18:22 +00:00

26 lines
649 B
WebGPU Shading Language

fn original_clusterfuzz_code() {
_ = atan2(1,.1);
}
fn more_tests_that_would_fail() {
// Builtin calls with mixed abstract args would fail because AInt would not materialize to AFloat.
{
let a = atan2(1, 0.1);
let b = atan2(0.1, 1);
}
// Same for binary operators
{
let a = 1 + 1.5;
let b = 1.5 + 1;
}
// Once above was fixed, builtin calls without assignment would also fail in backends because
// abstract constant value is not handled by backends. These should be removed by RemovePhonies
// transform.
{
_ = atan2(1, 0.1);
_ = atan2(0.1, 1);
}
}