authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-07-21 16:43:43-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-07-21 16:43:43-04:00
log27a5f2c4fa9cfa104faa4cc2b15cd21cc5a5501f
tree962407c4c0131944363cd83305706de3b0989d28
parent72e983670e65eac0b89da5564432988862828b30
signature Commit is signed but in an unrecognized format.

remove errors for async calling convention


1 files changed, 0 insertions(+), 14 deletions(-)

src/ir.cpp-14
......@@ -14984,20 +14984,6 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c
1498414984 }
1498514985 return ira->codegen->invalid_instruction;
1498614986 }
14987 if (fn_type_id->cc == CallingConventionAsync && !call_instruction->is_async) {
14988 ErrorMsg *msg = ir_add_error(ira, fn_ref, buf_sprintf("must use async keyword to call async function"));
14989 if (fn_proto_node) {
14990 add_error_note(ira->codegen, msg, fn_proto_node, buf_sprintf("declared here"));
14991 }
14992 return ira->codegen->invalid_instruction;
14993 }
14994 if (fn_type_id->cc != CallingConventionAsync && call_instruction->is_async) {
14995 ErrorMsg *msg = ir_add_error(ira, fn_ref, buf_sprintf("cannot use async keyword to call non-async function"));
14996 if (fn_proto_node) {
14997 add_error_note(ira->codegen, msg, fn_proto_node, buf_sprintf("declared here"));
14998 }
14999 return ira->codegen->invalid_instruction;
15000 }
1500114987
1500214988
1500314989 if (fn_type_id->is_var_args) {