================
@@ -411,7 +411,7 @@ Descriptor *Program::createDescriptor(const DeclTy &D,
const Type *Ty,
if (OptPrimType T = Ctx.classify(ElemTy)) {
// Arrays of primitives.
unsigned ElemSize = primSize(*T);
- if (std::numeric_limits<unsigned>::max() / ElemSize <= NumElems) {
+ if (Descriptor::MaxArrayElemBytes / ElemSize < NumElems) {
----------------
cor3ntin wrote:
can we add parentheses here?
https://github.com/llvm/llvm-project/pull/175402
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits