================
@@ -5913,8 +5878,10 @@ bool SemaHLSL::transformInitList(const InitializedEntity 
&Entity,
   }
   size_t ExpectedSize = ILT.DestTypes.size();
   size_t ActualSize = ILT.ArgExprs.size();
-  if (ExpectedSize == 0 && ActualSize == 0)
+  if (ExpectedSize == 0 && ActualSize == 0) {
+    Init->resizeInits(Ctx, 0);
----------------
spall wrote:

To remove any content of the InitListExpr, so the InitListExpr will succeed in 
a case such as this. 
```
EmptyStruct E1 = {};
EmptyStruct E = {E1};
```
This is expected to be changed in later work, but is necessary for removing 
constructors at this time.
https://github.com/llvm/llvm-project/issues/188309#issuecomment-4129877776

https://github.com/llvm/llvm-project/pull/190089
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to