[clang] 6c671ac - [clang][bytecode][NFC] Return nullptr instead of {} (#176912)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 20 05:52:39 PST 2026
Author: Timm Baeder
Date: 2026-01-20T14:52:34+01:00
New Revision: 6c671ace7735a7a0fdcdbf0a233f197e51514268
URL: https://github.com/llvm/llvm-project/commit/6c671ace7735a7a0fdcdbf0a233f197e51514268
DIFF: https://github.com/llvm/llvm-project/commit/6c671ace7735a7a0fdcdbf0a233f197e51514268.diff
LOG: [clang][bytecode][NFC] Return nullptr instead of {} (#176912)
Added:
Modified:
clang/lib/AST/ByteCode/Program.cpp
Removed:
################################################################################
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);
}
More information about the cfe-commits
mailing list