| ... | @@ -2341,7 +2341,7 @@ fn transInitListExprArray( | ... | @@ -2341,7 +2341,7 @@ fn transInitListExprArray( |
| 2341 | assert(@ptrCast(*const clang.Type, arr_type).isConstantArrayType()); | 2341 | assert(@ptrCast(*const clang.Type, arr_type).isConstantArrayType()); |
| 2342 | const const_arr_ty = @ptrCast(*const clang.ConstantArrayType, arr_type); | 2342 | const const_arr_ty = @ptrCast(*const clang.ConstantArrayType, arr_type); |
| 2343 | const size_ap_int = const_arr_ty.getSize(); | 2343 | const size_ap_int = const_arr_ty.getSize(); |
| 2344 | const all_count = size_ap_int.getLimitedValue(math.maxInt(usize)); | 2344 | const all_count = size_ap_int.getLimitedValue(usize); |
| 2345 | const leftover_count = all_count - init_count; | 2345 | const leftover_count = all_count - init_count; |
| 2346 | | 2346 | |
| 2347 | if (all_count == 0) { | 2347 | if (all_count == 0) { |
| ... | @@ -4266,7 +4266,7 @@ fn transType(c: *Context, scope: *Scope, ty: *const clang.Type, source_loc: clan | ... | @@ -4266,7 +4266,7 @@ fn transType(c: *Context, scope: *Scope, ty: *const clang.Type, source_loc: clan |
| 4266 | const const_arr_ty = @ptrCast(*const clang.ConstantArrayType, ty); | 4266 | const const_arr_ty = @ptrCast(*const clang.ConstantArrayType, ty); |
| 4267 | | 4267 | |
| 4268 | const size_ap_int = const_arr_ty.getSize(); | 4268 | const size_ap_int = const_arr_ty.getSize(); |
| 4269 | const size = size_ap_int.getLimitedValue(math.maxInt(usize)); | 4269 | const size = size_ap_int.getLimitedValue(usize); |
| 4270 | const elem_type = try transType(c, scope, const_arr_ty.getElementType().getTypePtr(), source_loc); | 4270 | const elem_type = try transType(c, scope, const_arr_ty.getElementType().getTypePtr(), source_loc); |
| 4271 | | 4271 | |
| 4272 | return Tag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_type }); | 4272 | return Tag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_type }); |