You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Semantics declarations on resources, static variables and cbuffer members should be an error/warning #7639
Description
There are many places where DXC currently accepts semantic declarations that don't really make much sense. This includes resource declarations, static variables and members of cbuffers. I wouldn't be surprised if I missed some other cases. This works with any semantic name as far as I can tell.
Actual Behavior
All of the semantics do nothing in these cases, but there are no diagnostics emitted. It should probably at minimum be a warning like it is in clang. Regarding cbuffers specifically, it should technically still be valid to have a nested struct inside with semantics on its members because that struct could then be reused for a function entry point parameter or return value, but you cannot directly use a cbuffer that way because it is not considered a struct and thus semantic declarations on its direct (non-nested) members should be rejected.
Activity