From 27f5c00c607e08b3cdf37f3bf9f4ccf156de2ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 14 Jul 2024 20:12:02 +0200 Subject: [PATCH] [clang][Interp] Fix a build failure on Windows The usual ambiguous APInt constructor: https://lab.llvm.org/buildbot/#/builders/141/builds/764 --- clang/lib/AST/Interp/Interp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/AST/Interp/Interp.cpp b/clang/lib/AST/Interp/Interp.cpp index cafe2175f5cc4b..0ec77200c3a798 100644 --- a/clang/lib/AST/Interp/Interp.cpp +++ b/clang/lib/AST/Interp/Interp.cpp @@ -715,8 +715,8 @@ bool CheckNewDeleteForms(InterpState &S, CodePtr OpPC, bool NewWasArray, if (D->isArray()) { QualType ElemQT = D->getType()->getPointeeType(); TypeToDiagnose = S.getCtx().getConstantArrayType( - ElemQT, APInt(64, D->getNumElems(), false), nullptr, - ArraySizeModifier::Normal, 0); + ElemQT, APInt(64, static_cast(D->getNumElems()), false), + nullptr, ArraySizeModifier::Normal, 0); } else TypeToDiagnose = D->getType()->getPointeeType();