From 12d09b5a6cb9e921aace1bec484c76244e9afa94 Mon Sep 17 00:00:00 2001 From: Mukund Keshava Date: Wed, 19 Feb 2025 18:19:10 +0530 Subject: Fix zero size array handling in slangc (#6399) * Fix zero size array handling in slangc Fixes #2890 1. Fix zero size array handling in slangc 2. Add new zero size array diagnostic test. * format code * fix review comments --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska --- tests/diagnostics/array-zero-size.slang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/diagnostics') diff --git a/tests/diagnostics/array-zero-size.slang b/tests/diagnostics/array-zero-size.slang index 5c62610ba..f67f163fd 100644 --- a/tests/diagnostics/array-zero-size.slang +++ b/tests/diagnostics/array-zero-size.slang @@ -2,12 +2,12 @@ // Test that array size cannot be zero -//TEST:SIMPLE: +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): [numthreads(4, 1, 1)] void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { bar(); } - -func bar() -> int[0]; // expected-error 30025 "array size must be larger than zero." \ No newline at end of file +//CHECK: ([[# @LINE+1]]): error 30025 +func bar() -> int[0]; -- cgit v1.2.3