================
@@ -4284,6 +4284,9 @@ bool SemaHLSL::transformInitList(const InitializedEntity 
&Entity,
   }
   size_t ExpectedSize = ILT.DestTypes.size();
   size_t ActualSize = ILT.ArgExprs.size();
+  if (ExpectedSize == 0 && ActualSize == 0)
----------------
spall wrote:

In the case the object being initialized is an Incomplete Array Type, which 
afaict is the only place there is a division by 'ExpectedSize', 'ExpectedSize' 
should be at least 1. I think we can add an assertion that ExpectedSize will 
not be zero at that point. 

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

Reply via email to