================
@@ -3600,8 +3600,11 @@ ExprResult Sema::ActOnCharacterConstant(const Token
&Tok, Scope *UDLScope) {
ExprResult Sema::ActOnIntegerConstant(SourceLocation Loc, uint64_t Val) {
unsigned IntSize = Context.getTargetInfo().getIntWidth();
- return IntegerLiteral::Create(Context, llvm::APInt(IntSize, Val),
- Context.IntTy, Loc);
+ // TODO: Avoid implicit trunc?
+ return IntegerLiteral::Create(
+ Context,
+ llvm::APInt(IntSize, Val, /*isSigned=*/false, /*implicitTrunc=*/true),
----------------
nikic wrote:
I've changed this to set isSigned=true and updated the signature to use int64_t
instead of uint64_t to clarify that a signed value is expected.
https://github.com/llvm/llvm-project/pull/80309
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits