Open llvm-beanz opened 2 years ago
With -HV 2021, the code below produces the diagnostic error: scalar, vector, or matrix expected.
-HV 2021
error: scalar, vector, or matrix expected
If increment and decrement operators are expected to work we should fix that, if not, we should provide a more useful diagnostic.
struct Foo { int x; void operator++(int){ x += 1; } void operator++(){ x += 1; } }; [numthreads(1, 1, 1)] void main(uint tidx : SV_DispatchThreadId) { Foo A = {11}; A++; ++A; }
We get the same bad errors for the unary operators ~ and !.
~
!
Oops. I will take a look
We've removed support for the offending operators in HLSL 2021. We should view this as a feature request for HLSL 202x.
With
-HV 2021
, the code below produces the diagnosticerror: scalar, vector, or matrix expected
.If increment and decrement operators are expected to work we should fix that, if not, we should provide a more useful diagnostic.