https://github.com/llvm-beanz commented:
We either need to fix code generation so that we correctly handle modifications
of the binary operator's lvalue, or we need to represent the binary operator in
the AST as returning an rvalue.
This code should either work following C++ rules, or fail to compile following
C rules:
```hlsl
export int fn() {
int Arr[2] = {0, 1};
int Arr2[2] = {1, 2};
(Arr = Arr2)[0] = 6;
return Arr[0] + Arr[1];
}
```
https://github.com/llvm/llvm-project/pull/109323
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits