Sema: don't allow passing non-extern types to varargs parameters

This commit is contained in:
Jacob Young
2023-11-08 14:42:45 -05:00
parent 045a5e924c
commit 52d8099dae

View File

@@ -29436,6 +29436,7 @@ fn coerceVarArgParam(
}
},
else => if (uncasted_ty.isAbiInt(mod)) int: {
if (!try sema.validateExternType(uncasted_ty, .param_ty)) break :int inst;
const target = sema.mod.getTarget();
const uncasted_info = uncasted_ty.intInfo(mod);
if (uncasted_info.bits <= target.c_type_bit_size(switch (uncasted_info.signedness) {