================
@@ -858,8 +858,8 @@ bool ByteCodeExprGen<Emitter>::VisitStringLiteral(const 
StringLiteral *E) {
 
   // If the initializer string is too long, a diagnostic has already been
   // emitted. Read only the array length from the string literal.
-  unsigned N =
-      std::min(unsigned(CAT->getSize().getZExtValue()), E->getLength());
+  unsigned ArraySize = CAT->getSize().getZExtValue();
----------------
shafik wrote:

So `getZExtValue()` returns `uint64_t` yet we are using `unsigned`. I know this 
is already an existing problem that we make varying assumptions in different 
places but I am wondering what the long-term plan is for this this. Forgive me 
if I have asked this question in another context and I just forgot.

https://github.com/llvm/llvm-project/pull/66862
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to