Skip to content

Commit 3bab57b

Browse files
committed
Get the size from e->getArraySize() rather than using size_t
1 parent 25edfca commit 3bab57b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CGExprCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ static llvm::Value *EmitCXXNewAllocSize(CodeGenFunction &CGF,
733733
// We multiply the size of all dimensions for NumElements.
734734
// e.g for 'int[2][3]', ElemType is 'int' and NumElements is 6.
735735
numElements = ConstantEmitter(CGF).tryEmitAbstract(
736-
*e->getArraySize(), CGF.getContext().getSizeType());
736+
*e->getArraySize(), (*e->getArraySize())->getType());
737737
if (!numElements)
738738
numElements = CGF.EmitScalarExpr(*e->getArraySize());
739739
assert(isa<llvm::IntegerType>(numElements->getType()));

0 commit comments

Comments
 (0)