================
@@ -6818,15 +6818,17 @@ bool Compiler<Emitter>::emitDestruction(const 
Descriptor *Desc,
         return true;
     }
 
-    for (ssize_t I = Desc->getNumElems() - 1; I >= 0; --I) {
-      if (!this->emitConstUint64(I, Loc))
-        return false;
-      if (!this->emitArrayElemPtrUint64(Loc))
-        return false;
-      if (!this->emitDestruction(ElemDesc, Loc))
-        return false;
-      if (!this->emitPopPtr(Loc))
-        return false;
+    if (size_t N = Desc->getNumElems()) {
----------------
efriedma-quic wrote:

Please try to avoid implicit integer conversions where overflow is a potential 
issue; `Desc->getNumElems()` returns an `unsigned`, so please just make the 
variable unsigned as well.

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

Reply via email to