llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.75k stars 11.89k forks source link

Semantic argument type mismatch #95150

Open llvm-beanz opened 4 months ago

llvm-beanz commented 4 months ago

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

letonchanh commented 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.

llvm-beanz commented 4 months ago

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.

pow2clk commented 2 months ago

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