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

This commit is contained in:
Jon Ross-Perkins authored and GitHub committed 2023-09-07 18:53:38 +00:00
1 parent 80e307e2ce
commit 87d4c2dfc6
15 files changed
+532 -18

No files matched your search

+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(