Description
All out and inout parameters should use reference types as their qual types in the AST.
DXC's ASTs currently model some types as pass-by-value even when they are out or inout, which makes the ASTs inaccurately reflect the program. In order to address issues with AST-based error and warning analysis and implement a correct calling convention for DXIL libraries we need to produce accurate ASTs.
Description All
out
andinout
parameters should use reference types as their qual types in the AST.DXC's ASTs currently model some types as pass-by-value even when they are
out
orinout
, which makes the ASTs inaccurately reflect the program. In order to address issues with AST-based error and warning analysis and implement a correct calling convention for DXIL libraries we need to produce accurate ASTs.Steps to Reproduce Example shader
See the produced AST:
FunctionDecl 0x55e2317741b0 <line:5:1, line:6:1> line:5:6 used Fn 'void (__restrict SomeStruct)'
should have a reference parameter.The argument copy semantics are also not represented in the AST, which will need to be fixed to address this.
Environment