Files
clang-p2996/clang/test/SemaHLSL/Semantics/missing_entry_annotation.hlsl
Chris Bieneman bdf1327fea [HLSL] Entry functions require param annotation
HLSL entry function parameters must have parameter annotations. This
allows appropriate intrinsic values to be populated into parameters
during code generation.

This does not handle entry function return values, which will be
handled in a subsequent commit because we don't currently support any
annotations that are valid for function returns.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D131625
2022-08-24 14:35:11 -05:00

5 lines
313 B
HLSL

// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -fsyntax-only -hlsl-entry main -verify %s
[numthreads(1,1, 1)]
void main(int GI) { } // expected-error{{semantic annotations must be present for all parameters of an entry function or patch constant function}} expected-note{{'GI' declared here}}