Improve testing and handling of unsigned APInt values (#3202)

This commit is contained in:
Jon Ross-Perkins
2023-09-07 18:53:38 +00:00
committed by GitHub
parent 80e307e2ce
commit 87d4c2dfc6
15 changed files with 532 additions and 18 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ auto HandleArrayExpression(Context& context, Parse::Node parse_node) -> bool {
auto bound_value = context.semantics_ir().GetIntegerLiteral(
bound_node.GetAsIntegerLiteral());
// TODO: Produce an error if the array type is too large.
if (bound_value.getBitWidth() <= 64) {
if (bound_value.getActiveBits() <= 64) {
context.AddNodeAndPush(
parse_node,
SemIR::Node::ArrayType::Make(