Skip to content

Commit

Permalink
[clang][Interp][NFC] Don't pass on metadata size for composite arrays
Browse files Browse the repository at this point in the history
We don't need the metadata size for every element, just for the topmost
descriptor.
  • Loading branch information
tbaederr committed May 14, 2024
1 parent 0aa5fa9 commit 5865482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/AST/Interp/Program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ Descriptor *Program::createDescriptor(const DeclTy &D, const Type *Ty,
// Arrays of composites. In this case, the array is a list of pointers,
// followed by the actual elements.
const Descriptor *ElemDesc = createDescriptor(
D, ElemTy.getTypePtr(), MDSize, IsConst, IsTemporary);
D, ElemTy.getTypePtr(), std::nullopt, IsConst, IsTemporary);
if (!ElemDesc)
return nullptr;
unsigned ElemSize =
Expand Down

0 comments on commit 5865482

Please sign in to comment.