llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/176912.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Program.cpp (+2-2) ``````````diff diff --git a/clang/lib/AST/ByteCode/Program.cpp b/clang/lib/AST/ByteCode/Program.cpp index d038c30d1ef82..76fec63a8920d 100644 --- a/clang/lib/AST/ByteCode/Program.cpp +++ b/clang/lib/AST/ByteCode/Program.cpp @@ -412,7 +412,7 @@ Descriptor *Program::createDescriptor(const DeclTy &D, const Type *Ty, // Arrays of primitives. unsigned ElemSize = primSize(*T); if ((Descriptor::MaxArrayElemBytes / ElemSize) < NumElems) { - return {}; + return nullptr; } return allocateDescriptor(D, *T, MDSize, NumElems, IsConst, IsTemporary, IsMutable); @@ -425,7 +425,7 @@ Descriptor *Program::createDescriptor(const DeclTy &D, const Type *Ty, return nullptr; unsigned ElemSize = ElemDesc->getAllocSize() + sizeof(InlineDescriptor); if (std::numeric_limits<unsigned>::max() / ElemSize <= NumElems) - return {}; + return nullptr; return allocateDescriptor(D, Ty, ElemDesc, MDSize, NumElems, IsConst, IsTemporary, IsMutable); } `````````` </details> https://github.com/llvm/llvm-project/pull/176912 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
