Icohedron wrote: What if the initializer list contains a function call with side-effects?
For instance, https://godbolt.org/z/zWPo1o3vc ```hlsl struct Empty {}; RWStructuredBuffer<int> Out; Empty foo() { Out[0] = 12; Empty Result; return Result; } [numthreads(1, 1, 1)] void main() { Empty E = {foo()}; } ``` I would expect `Out[0] = 12`, but if you replace `Empty E = {foo()};` with `Empty E = {};` then that store does not occur. https://github.com/llvm/llvm-project/pull/187773 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
