Open llvm-beanz opened 4 months ago
Hi @llvm-beanz,
From your description, it seems that we need to enhance the type checker of Clang for this case. I want to contribute but I am new to Clang and LLVM. Appreciate it if you could provide some details and/or guidance.
Hi @letonchanh, this is actually much more complicated than that. This is specifically part of the HLSL language where input parameters can be annotated as system values and we need to build a verification infrastructure for checking the types match correctly. I don’t think this is a good task for a new contributor since it isn’t fully specified.
Just a note to make sure that we address the full type information including static vs non-static as this DXC issue highlights: https://github.com/microsoft/DirectXShaderCompiler/issues/5280
DXC does very little verification of the types of data that a system value is assigned to. We should have verification in Clang that system values are assigned to appropriate typed variables.
Related issue from DXC: https://github.com/microsoft/DirectXShaderCompiler/issues/2299