Merge remote-tracking branch 'origin/master' into llvm14

This commit is contained in:
Andrew Kelley 2022-07-06 17:55:05 -07:00
commit 1b610d7853
2 changed files with 11 additions and 4 deletions

View File

@ -6042,12 +6042,12 @@ fn instantiateGenericCall(
.param_comptime, .param_anytype_comptime, .param, .param_anytype => {},
else => continue,
}
const arg_src = call_src; // TODO: better source location
const is_runtime = comptime_args[total_i].val.tag() == .generic_poison and
comptime_args[total_i].ty.hasRuntimeBits() and
!comptime_args[total_i].ty.comptimeOnly();
!(try sema.typeRequiresComptime(block, arg_src, comptime_args[total_i].ty));
if (is_runtime) {
const param_ty = new_fn_info.param_types[runtime_i];
const arg_src = call_src; // TODO: better source location
const uncasted_arg = uncasted_args[total_i];
const casted_arg = try sema.coerce(block, param_ty, uncasted_arg, arg_src);
try sema.queueFullTypeResolution(param_ty);

View File

@ -62,8 +62,15 @@ pub fn addCases(cases: *tests.StandaloneContext) void {
cases.add("tools/process_headers.zig");
cases.add("tools/update-license-headers.zig");
cases.add("tools/update-linux-headers.zig");
cases.add("tools/update_clang_options.zig");
// Disabled due to tripping LLVM 13 assertion:
// https://github.com/ziglang/zig/issues/12022
//cases.add("tools/update_clang_options.zig");
cases.add("tools/update_cpu_features.zig");
cases.add("tools/update_glibc.zig");
cases.add("tools/update_spirv_features.zig");
// Disabled due to tripping LLVM 13 assertion:
// https://github.com/ziglang/zig/issues/12015
//cases.add("tools/update_spirv_features.zig");
}