From 1fead9a9a9cd1a689c39234cdaafb554bb5627c3 Mon Sep 17 00:00:00 2001 From: MikePopoloski Date: Sat, 28 Sep 2024 16:46:33 -0400 Subject: [PATCH] Fix clang sanitizer build --- source/ast/expressions/AssignmentExpressions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ast/expressions/AssignmentExpressions.cpp b/source/ast/expressions/AssignmentExpressions.cpp index 4301a5064..a132126f5 100644 --- a/source/ast/expressions/AssignmentExpressions.cpp +++ b/source/ast/expressions/AssignmentExpressions.cpp @@ -1653,7 +1653,7 @@ ConstantValue SimpleAssignmentPatternExpression::applyConversions(EvalContext& c const ConstantValue& rval) const { if (rval.isInteger()) { auto& ri = rval.integer(); - int32_t msb = ri.getBitWidth() - 1; + int32_t msb = int32_t(ri.getBitWidth()) - 1; SmallVector ints; for (auto elem : elements()) { @@ -1661,7 +1661,7 @@ ConstantValue SimpleAssignmentPatternExpression::applyConversions(EvalContext& c if (elemRhs.kind == ExpressionKind::Conversion) { auto& conv = elemRhs.as(); if (conv.isImplicit()) { - auto width = conv.operand().type->getBitWidth(); + auto width = int32_t(conv.operand().type->getBitWidth()); ints.emplace_back( conv.applyTo(context, ri.slice(msb, msb - width + 1)).integer()); msb -= width; @@ -1669,7 +1669,7 @@ ConstantValue SimpleAssignmentPatternExpression::applyConversions(EvalContext& c } } - auto width = elemRhs.type->getBitWidth(); + auto width = int32_t(elemRhs.type->getBitWidth()); ints.emplace_back(ri.slice(msb, msb - width + 1)); msb -= width; }