Skip to content

Commit

Permalink
[clang][Interp] Fix a build failure on Windows
Browse files Browse the repository at this point in the history
The usual ambiguous APInt constructor:

https://lab.llvm.org/buildbot/#/builders/141/builds/764
  • Loading branch information
tbaederr committed Jul 14, 2024
1 parent 5fe0a81 commit 27f5c00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/AST/Interp/Interp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint64_t>(D->getNumElems()), false),
nullptr, ArraySizeModifier::Normal, 0);
} else
TypeToDiagnose = D->getType()->getPointeeType();

Expand Down

0 comments on commit 27f5c00

Please sign in to comment.