summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics
diff options
context:
space:
mode:
authorMukund Keshava <mkeshava@nvidia.com>2025-02-19 18:19:10 +0530
committerGitHub <noreply@github.com>2025-02-19 12:49:10 +0000
commit12d09b5a6cb9e921aace1bec484c76244e9afa94 (patch)
tree9775acd9fdf8edf78ead04c4c8936723f175cd97 /tests/diagnostics
parent7315b33cf8dbf7759b05ff47612478b71238fa19 (diff)
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 <ellieh@nvidia.com>
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/array-zero-size.slang6
1 files changed, 3 insertions, 3 deletions
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];