[clang] [HLSL] Allow input semantics on structs (PR #159047)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 15 08:26:50 PDT 2025


Keenuts wrote:

> We should have tests for some cases like:
> 
> ```
> struct S {
>   float4 f0 : SV_Position;
>   float4 f1;  // error due to missing semantic here!
> };
> 
> float4 main(S s) { }
> 
> // Semantics on return objects are required but not supported yet (right?)
> float4 main2(float4 p : SV_POSITION, float4 f) { } // error for missing semantic on `f`
> ```

Yes, I'll add several sema checks now that those are validated in sema.

https://github.com/llvm/llvm-project/pull/159047


More information about the cfe-commits mailing list