llvm-project/clang/test/CodeGenHLSL/semantics/DispatchThreadID-noindex.hlsl
Nathan Gauër 78554d9e84
Reapply "[HLSL] Rework semantic handling as attributes" (#167862)
Last PR had asan failures due to bad use of a Twine instead of an
std::string.
2025-11-13 14:09:15 +01:00

9 lines
517 B
HLSL

// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s -verify -verify-ignore-unexpected=note,error
// RUN: %clang_cc1 -triple spirv-linux-vulkan-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s -verify -verify-ignore-unexpected=note,error
[shader("compute")]
[numthreads(8,8,1)]
void foo(uint Idx : SV_DispatchThreadID1) {
// expected-error@-1 {{semantic 'SV_DispatchThreadID' does not allow indexing}}
}