analyze: fix crash when return type is invalid

This commit is contained in:
Andrew Kelley 2016-01-25 22:20:52 -07:00
parent a3e288ab5b
commit 01428d4a72

View File

@ -3466,6 +3466,10 @@ static TypeTableEntry *analyze_fn_call_raw(CodeGen *g, ImportTableEntry *import,
TypeTableEntry *return_type = unwrapped_node_type(fn_proto->return_type); TypeTableEntry *return_type = unwrapped_node_type(fn_proto->return_type);
if (return_type->id == TypeTableEntryIdInvalid) {
return return_type;
}
if (handle_is_ptr(return_type)) { if (handle_is_ptr(return_type)) {
context->cast_alloca_list.append(node); context->cast_alloca_list.append(node);
} }