authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-01-25 22:20:52-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-01-25 22:20:52-07:00
log01428d4a72c8013e1fe8cfc69eedeb843b1d75c8
tree99698ddc6f5bc22f660e9669c094a3933f34d856
parenta3e288ab5be1008dafa86b47c18ebf480cc9d6a7

analyze: fix crash when return type is invalid


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

src/analyze.cpp+4
...@@ -3466,6 +3466,10 @@ static TypeTableEntry *analyze_fn_call_raw(CodeGen *g, ImportTableEntry *import,...@@ -3466,6 +3466,10 @@ static TypeTableEntry *analyze_fn_call_raw(CodeGen *g, ImportTableEntry *import,
34663466
3467 TypeTableEntry *return_type = unwrapped_node_type(fn_proto->return_type);3467 TypeTableEntry *return_type = unwrapped_node_type(fn_proto->return_type);
34683468
3469 if (return_type->id == TypeTableEntryIdInvalid) {
3470 return return_type;
3471 }
3472
3469 if (handle_is_ptr(return_type)) {3473 if (handle_is_ptr(return_type)) {
3470 context->cast_alloca_list.append(node);3474 context->cast_alloca_list.append(node);
3471 }3475 }